import{d as B,c as r,e as n,L as u,w as o,f as t,G as T,t as z,u as p,j as c,g as s,h as v,F as k,E as m,D as y}from"./index-1fa25223.js";import{o as d,t as b,V as w}from"./VListItem-53d44b85.js";import{V as f}from"./VBadge-3b97e665.js";import{a as V}from"./VList-f519ecda.js";import{V as _}from"./VMenu-85495654.js";import{V as L}from"./VToolbar-a7b4dbd4.js";import{_ as M}from"./_plugin-vue_export-helper-c27b6911.js";const N={key:0},O=B({__name:"Toolbar",props:{color:{default:"transparent"},icon:{default:void 0},title:{default:void 0},count:{default:void 0},menuItems:{default:void 0},enforceOverflowMenu:{type:Boolean,default:!1}},emits:["iconClicked"],setup(D,{emit:C}){const $=C;return(l,g)=>{var h;return r(),n(L,{color:l.color,class:"header"},u({_:2},[l.icon?{name:"prepend",fn:o(()=>[t(d,{icon:l.icon,size:"large",style:{"margin-left":"10px"},onClick:g[0]||(g[0]=e=>$("iconClicked"))},null,8,["icon"])]),key:"0"}:void 0,l.title?{name:"title",fn:o(()=>[T(z(l.title)+" ",1),l.count!==void 0&&p(y)("bp4")?(r(),n(f,{key:0,color:"grey",content:l.count,inline:""},null,8,["content"])):c("",!0)]),key:"1"}:void 0,(h=l.menuItems)!=null&&h.length?{name:"append",fn:o(()=>[(r(!0),s(k,null,v(l.menuItems.filter(e=>!e.hide),e=>{var a;return r(),s("div",{key:e.label},[(a=e.subItems)!=null&&a.length?(r(),n(_,{key:0,location:"bottom end",scrim:"",density:"compact",slim:"",tile:""},{activator:o(({props:i})=>[t(b,m({variant:"text",style:{width:"40px"},ref_for:!0},i,{title:l.$t(e.label,e.labelArgs||[]),disabled:e.disabled==!0}),{default:o(()=>[t(f,{"model-value":e.active==!0,color:"error",dot:""},{default:o(()=>[t(d,{icon:e.icon,color:l.$vuetify.theme.current.dark?"#fff":"#000",size:"22px"},null,8,["icon","color"])]),_:2},1032,["model-value"])]),_:2},1040,["title","disabled"])]),default:o(()=>[t(V,null,{default:o(()=>[(r(!0),s(k,null,v(e.subItems.filter(i=>i.hide!=!0),(i,A)=>(r(),n(w,{key:A,title:l.$t(i.label,i.labelArgs||[]),disabled:i.disabled==!0,onClick:E=>i.action?i.action():""},u({append:o(()=>[i.selected?(r(),n(d,{key:0,icon:"mdi-check"})):c("",!0)]),_:2},[i.icon?{name:"prepend",fn:o(()=>[t(d,{icon:i.icon},null,8,["icon"])]),key:"0"}:void 0]),1032,["title","disabled","onClick"]))),128))]),_:2},1024)]),_:2},1024)):!l.enforceOverflowMenu&&(p(y)("bp3")||e.overflowAllowed==!1)?(r(),n(b,{key:1,variant:"text",style:{width:"40px"},title:l.$t(e.label,e.labelArgs||[]),disabled:e.disabled==!0,onClick:e.action},{default:o(()=>[t(f,{"model-value":e.active==!0,color:"error",dot:""},{default:o(()=>[t(d,{icon:e.icon,color:l.$vuetify.theme.current.dark?"#fff":"#000",size:"22px"},null,8,["icon","color"])]),_:2},1032,["model-value"])]),_:2},1032,["title","disabled","onClick"])):c("",!0)])}),128)),(!p(y)("bp3")||l.enforceOverflowMenu)&&l.menuItems.filter(e=>{var a;return e.hide!=!0&&!((a=e.subItems)!=null&&a.length)&&e.overflowAllowed!==!1}).length?(r(),s("div",N,[t(_,{location:"bottom end",scrim:""},{activator:o(({props:e})=>[t(b,m({variant:"plain",style:{width:"15px","margin-left":"-10px"}},e),{default:o(()=>[t(d,{icon:"mdi-dots-vertical",color:l.$vuetify.theme.current.dark?"#fff":"#000",size:"22",style:{"margin-right":"-5px",width:"15px"}},null,8,["color"])]),_:2},1040)]),default:o(()=>[t(V,{density:"compact",slim:"",tile:""},{default:o(()=>[(r(!0),s(k,null,v(l.menuItems.filter(e=>{var a;return e.hide!=!0&&!((a=e.subItems)!=null&&a.length)&&e.overflowAllowed!==!1}),(e,a)=>(r(),n(w,{key:a,title:l.$t(e.label,e.labelArgs||[]),disabled:e.disabled==!0,onClick:i=>e.action?e.action():""},u({_:2},[e.icon?{name:"prepend",fn:o(()=>[t(f,{"model-value":e.active==!0,color:"error",dot:""},{default:o(()=>[t(d,{icon:e.icon,color:l.$vuetify.theme.current.dark?"#fff":"#000",size:"22px"},null,8,["icon","color"])]),_:2},1032,["model-value"])]),key:"0"}:void 0]),1032,["title","disabled","onClick"]))),128))]),_:1})]),_:1})])):c("",!0)]),key:"2"}:void 0]),1032,["color"])}}});const J=M(O,[["__scopeId","data-v-25c31252"]]);export{J as T};
