import{_ as L,c as R,m as je,n as qe,o as Ie,p as Fe,q as Ne,r as Ve,s as Je,P as Qe,t as Xe,C as Ye,W as Ge,u as Ze,L as xe,R as en,v as nn,w as tn,l as sn,x as rn}from"./app-d76245a8.js";import{aF as j,j as q,c as I,r as T,k as s,l as r,z as o,bs as ue,w as n,q as a,p as B,F as D,N as H,s as f,v as u,x as m,bJ as ie,R as de,K as N,y as d,bM as le,aI as te,bq as se,aL as re,ac as ae,ba as pe,c7 as an,aN as on,c8 as un,c9 as dn,ca as ln,aP as pn,cb as mn,aR as cn,aK as yn,cc as fn,aQ as _n,aO as gn,g as me,E as ee,br as kn,aM as oe,e as hn,aB as U,bK as ce,bL as V,bf as ye,bt as fe,at as _e,bm as ge,bb as ke,bO as he,ab as An,bT as vn,aJ as bn,cd as Sn,ce as $n,b as Ae,o as ve,J as ne,av as wn,bX as Cn,a9 as On,ae as Mn,bQ as Bn}from"./vendor-7a11ff10.js";const F=["innerWidth","collapsed","cssSettings","isRtl"],be=j("div",F)`

`,Se=j("div",F)`
	${({innerWidth:e,collapsed:t,isRtl:k})=>k?e<=991?"margin-right: 2px;":t?"margin-right: 80px;":"margin-right: 240px;":""}
	${({innerWidth:e,collapsed:t,isRtl:k})=>k?"":e<=991?"margin-left: 2px;":t?"margin-left: 80px;":"margin-left: 240px;"}
	min-height: 100vh;
`,Pn=j("div",F)`
	display: flex;
	justify-content: flex-end;
	align-items: center;
`,Tn=j("div",F)`
	.ant-layout-header, .ant-menu-horizontal{
		background: #2e3f50 !important;
	}
`,$e=j("div",F)`

	.breadcrumb-header {
		.page-content-sub-header {
			padding-top: 10px !important;
			padding-bottom: 10px !important;

			${({cssSettings:e})=>e&&e.headerMenuMode=="horizontal"?"border-bottom: 0px":""};
		}

		.breadcrumb-left-border {
			border-left: none !important;
		}

		.ant-card-body {
			padding: ${({cssSettings:e})=>e&&e.headerMenuMode=="horizontal"?`0px ${e.leftRightPadding}`:"0px"};
			margin: ${({cssSettings:e})=>e&&e.headerMenuMode=="horizontal"?"0px":"0px 16px 0"};
		}
	}

	.dashboard-page-content-container {
		padding: ${({cssSettings:e})=>e&&e.headerMenuMode=="horizontal"?`0px ${e.leftRightPadding}`:"0px"};
		margin: ${({cssSettings:e})=>e&&e.headerMenuMode=="horizontal"?"0px":"0px 16px 0"};
		${({cssSettings:e})=>e&&e.headerMenuMode=="horizontal"?"border-top: 1px solid #cbd6e2":""};
	}

	.page-content-container {
		min-height: calc(100vh - 165px);
	}

    .setup-page-content-container {
		min-height: calc(100vh - 147px);
	}

	.email-page-content-container {
		min-height: calc(100vh - 202px);
	}

	.page-content-container, .email-page-content-container {
		${({cssSettings:e})=>e&&e.headerMenuMode=="horizontal"?"border-top: 1px solid #cbd6e2":""};

		.ant-card-body {
			padding: ${({cssSettings:e})=>e&&e.headerMenuMode=="horizontal"?`0px ${e.leftRightPadding}`:"0px"};
			margin: ${({cssSettings:e})=>e&&e.headerMenuMode=="horizontal"?"0px":"0px 16px 0"};
			padding-top: 30px;
		}
	}

	.setting-sidebar {
		margin-left: ${({cssSettings:e})=>e&&e.headerMenuMode=="horizontal"?`${e.leftRightPadding}`:"0px"};
	}
`,Wn=q({setup(){const{cssSettings:e}=R(),t=I();return{menuMode:T(e.value.headerMenuMode),menuModeChanged:S=>{t.commit("auth/updateCssSettings",{...e.value,headerMenuMode:S})}}}});function Kn(e,t,k,i,S,b){const h=s("a-switch");return r(),o(h,{checkedValue:"horizontal",unCheckedValue:"vertical",checked:e.menuMode,onChange:e.menuModeChanged,size:"small"},null,8,["checked","onChange"])}const we=L(Wn,[["render",Kn]]),Ln=q({components:{DownOutlined:ue},setup(){const e=I(),{selectedWarehouse:t,allWarehouses:k,appSetting:i,permsArray:S,user:b}=R();return{allWarehouses:k,selectedWarehouse:t,warehouseChanged:c=>{axiosAdmin.post("change-warehouse",{warehouse_id:c}).then(l=>{e.commit("auth/updateWarehouse",l.data.warehouse)})},appSetting:i,permsArray:S,user:b}}}),Rn={key:1};function Dn(e,t,k,i,S,b){const h=s("DownOutlined"),c=s("a-menu-item"),l=s("a-menu"),A=s("a-dropdown");return e.user&&e.user.user_type&&e.user.user_type=="staff_members"?(r(),o(A,{key:0,placement:e.appSetting.rtl?"bottomLeft":"bottomRight"},{overlay:n(()=>[a(l,null,{default:n(()=>[(r(!0),B(D,null,H(e.allWarehouses,g=>(r(),o(c,{key:g.xid,onClick:p=>e.warehouseChanged(g.xid)},{default:n(()=>[f(u(g.name),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:n(()=>[m("a",{class:"ant-dropdown-link",onClick:t[0]||(t[0]=ie(()=>{},["prevent"]))},[f(u(e.selectedWarehouse&&e.selectedWarehouse.name?e.selectedWarehouse.name:"")+" ",1),a(h)])]),_:1},8,["placement"])):(r(),B("span",Rn,u(e.selectedWarehouse&&e.selectedWarehouse.name?e.selectedWarehouse.name:""),1))}const zn=L(Ln,[["render",Dn]]),En=q({props:{btnType:{default:"default"},tooltip:{default:!0},customType:{default:"button"}},emits:["onAddSuccess"],components:{PlusOutlined:de,AddEdit:je},setup(e,{emit:t}){const{permsArray:k}=R(),{initData:i,addEditUrl:S}=qe(),b=T(!1),h=T("add"),c=T({...i});return{permsArray:k,visible:b,addEditType:h,addEditUrl:S,formData:c,addEditSuccess:()=>{b.value=!1,c.value={...i},t("onAddSuccess")},onClose:()=>{b.value=!1},showAdd:()=>{b.value=!0}}}}),Hn={key:0};function Un(e,t,k,i,S,b){const h=s("a-menu-item"),c=s("PlusOutlined"),l=s("a-button"),A=s("a-tooltip"),g=s("AddEdit");return e.permsArray.includes("expenses_create")||e.permsArray.includes("admin")?(r(),B("div",Hn,[e.customType=="menu"?(r(),o(h,{onClick:e.showAdd,key:"expenses"},{icon:n(()=>[N(e.$slots,"icon")]),default:n(()=>[N(e.$slots,"default")]),_:3},8,["onClick"])):(r(),B(D,{key:1},[e.tooltip?(r(),o(A,{key:0,placement:"topLeft",title:e.$t("expense.add"),"arrow-point-at-center":""},{default:n(()=>[a(l,{onClick:e.showAdd,class:"ml-5 no-border-radius",type:e.btnType},{icon:n(()=>[a(c)]),default:n(()=>[N(e.$slots,"default")]),_:3},8,["onClick","type"])]),_:3},8,["title"])):(r(),o(l,{key:1,onClick:e.showAdd,class:"ml-5 no-border-radius",type:e.btnType},{icon:n(()=>[a(c)]),default:n(()=>[N(e.$slots,"default")]),_:3},8,["onClick","type"]))],64)),a(g,{addEditType:e.addEditType,visible:e.visible,url:e.addEditUrl,onAddEditSuccess:e.addEditSuccess,onClosed:e.onClose,formData:e.formData,data:e.formData,pageTitle:e.$t("expense.add"),successMessage:e.$t("expense.created")},null,8,["addEditType","visible","url","onAddEditSuccess","onClosed","formData","data","pageTitle","successMessage"])])):d("",!0)}const jn=L(En,[["render",Un]]),qn={props:{position:{default:"bottom"}},components:{PlusOutlined:de,TeamOutlined:le,UserOutlined:te,AppstoreOutlined:se,ShopOutlined:re,ShoppingOutlined:ae,WalletOutlined:pe,PlusCircleOutlined:an,SolutionOutlined:on,BarsOutlined:un,CoffeeOutlined:dn,CreditCardOutlined:ln,DollarOutlined:pn,HddOutlined:mn,ApartmentOutlined:cn,TranslationOutlined:yn,FundViewOutlined:fn,AccountBookOutlined:_n,ScheduleOutlined:gn,StaffAddButton:Ie,CustomerAddButton:Fe,SupplierAddButton:Ne,BrandAddButton:Ve,CategoryAddButton:Je,ProductAddButton:Qe,ExpenseCategoryAddButton:Xe,ExpenseAddButton:jn,CurrencyAddButton:Ye,WarehouseAddButton:Ge,UnitAddButton:Ze,LanguageAddButton:xe,RoleAddButton:en,TaxAddButton:nn,PaymentModeAddButton:tn},setup(e,{emit:t}){const{permsArray:k,appSetting:i,addMenus:S}=R(),b=()=>{},h=me(()=>e.position=="bottom"?i.value.rtl?{position:"fixed",left:"40px",bottom:"30px"}:{position:"fixed",right:"40px",bottom:"30px"}:{});return{permsArray:k,appSetting:i,addMenus:S,menuSelected:b,affixStyle:h,innerWidth:window.innerWidth}}};function In(e,t,k,i,S,b){const h=s("PlusOutlined"),c=s("a-button"),l=s("PlusCircleOutlined"),A=s("TeamOutlined"),g=s("StaffAddButton"),p=s("SolutionOutlined"),w=s("CustomerAddButton"),v=s("UserOutlined"),_=s("SupplierAddButton"),C=s("CoffeeOutlined"),P=s("BrandAddButton"),$=s("BarsOutlined"),O=s("CategoryAddButton"),y=s("AppstoreOutlined"),M=s("ProductAddButton"),W=s("ShopOutlined"),K=s("a-menu-item"),z=s("ShoppingOutlined"),J=s("CreditCardOutlined"),Q=s("ExpenseCategoryAddButton"),X=s("WalletOutlined"),Y=s("ExpenseAddButton"),G=s("DollarOutlined"),Z=s("CurrencyAddButton"),E=s("HddOutlined"),x=s("WarehouseAddButton"),Be=s("ApartmentOutlined"),Pe=s("UnitAddButton"),Te=s("TranslationOutlined"),We=s("LanguageAddButton"),Ke=s("FundViewOutlined"),Le=s("RoleAddButton"),Re=s("ScheduleOutlined"),De=s("TaxAddButton"),ze=s("AccountBookOutlined"),Ee=s("PaymentModeAddButton"),He=s("a-menu"),Ue=s("a-dropdown");return r(),B("div",{style:ee(i.affixStyle)},[a(Ue,{placement:i.appSetting.rtl?k.position=="top"?"bottomLeft":"topLeft":k.position=="top"?"bottomRight":"topRight"},{overlay:n(()=>[a(He,null,{default:n(()=>[i.addMenus.includes("staff_member")?(r(),o(g,{key:0,customType:"menu"},{icon:n(()=>[a(A)]),default:n(()=>[m("span",null,u(e.$t("topbar_add_button.add_staff_member")),1)]),_:1})):d("",!0),i.addMenus.includes("customer")?(r(),o(w,{key:1,customType:"menu"},{icon:n(()=>[a(p)]),default:n(()=>[m("span",null,u(e.$t("topbar_add_button.add_customer")),1)]),_:1})):d("",!0),i.addMenus.includes("supplier")?(r(),o(_,{key:2,customType:"menu"},{icon:n(()=>[a(v)]),default:n(()=>[m("span",null,u(e.$t("topbar_add_button.add_supplier")),1)]),_:1})):d("",!0),i.addMenus.includes("brand")?(r(),o(P,{key:3,customType:"menu"},{icon:n(()=>[a(C)]),default:n(()=>[m("span",null,u(e.$t("topbar_add_button.add_brand")),1)]),_:1})):d("",!0),i.addMenus.includes("category")?(r(),o(O,{key:4,customType:"menu"},{icon:n(()=>[a($)]),default:n(()=>[m("span",null,u(e.$t("topbar_add_button.add_category")),1)]),_:1})):d("",!0),i.addMenus.includes("product")?(r(),o(M,{key:5,customType:"menu"},{icon:n(()=>[a(y)]),default:n(()=>[m("span",null,u(e.$t("topbar_add_button.add_product")),1)]),_:1})):d("",!0),(i.permsArray.includes("sales_create")||i.permsArray.includes("admin"))&&i.addMenus.includes("sales")?(r(),o(K,{onClick:t[0]||(t[0]=()=>{i.menuSelected(),e.$router.push({name:"admin.stock.sales.create"})}),key:"sales"},{default:n(()=>[a(W),f(" "+u(e.$t("topbar_add_button.add_sales")),1)]),_:1})):d("",!0),(i.permsArray.includes("purchases_create")||i.permsArray.includes("admin"))&&i.addMenus.includes("purchase")?(r(),o(K,{onClick:t[1]||(t[1]=()=>{i.menuSelected(),e.$router.push({name:"admin.stock.purchases.create"})}),key:"purchases"},{default:n(()=>[a(z),f(" "+u(e.$t("topbar_add_button.add_purchase")),1)]),_:1})):d("",!0),i.addMenus.includes("expense_category")?(r(),o(Q,{key:8,customType:"menu"},{icon:n(()=>[a(J)]),default:n(()=>[m("span",null,u(e.$t("topbar_add_button.add_expense_cateogory")),1)]),_:1})):d("",!0),i.addMenus.includes("expense")?(r(),o(Y,{key:9,customType:"menu"},{icon:n(()=>[a(X)]),default:n(()=>[m("span",null,u(e.$t("topbar_add_button.add_expense")),1)]),_:1})):d("",!0),i.addMenus.includes("currency")?(r(),o(Z,{key:10,customType:"menu"},{icon:n(()=>[a(G)]),default:n(()=>[m("span",null,u(e.$t("topbar_add_button.add_currency")),1)]),_:1})):d("",!0),i.addMenus.includes("warehouse")?(r(),o(x,{key:11,customType:"menu"},{icon:n(()=>[a(E)]),default:n(()=>[m("span",null,u(e.$t("topbar_add_button.add_warehouse")),1)]),_:1})):d("",!0),i.addMenus.includes("unit")?(r(),o(Pe,{key:12,customType:"menu"},{icon:n(()=>[a(Be)]),default:n(()=>[m("span",null,u(e.$t("topbar_add_button.add_unit")),1)]),_:1})):d("",!0),i.addMenus.includes("language")?(r(),o(We,{key:13,customType:"menu"},{icon:n(()=>[a(Te)]),default:n(()=>[m("span",null,u(e.$t("topbar_add_button.add_language")),1)]),_:1})):d("",!0),i.addMenus.includes("role")?(r(),o(Le,{key:14,customType:"menu"},{icon:n(()=>[a(Ke)]),default:n(()=>[m("span",null,u(e.$t("topbar_add_button.add_role")),1)]),_:1})):d("",!0),i.addMenus.includes("tax")?(r(),o(De,{key:15,customType:"menu"},{icon:n(()=>[a(Re)]),default:n(()=>[m("span",null,u(e.$t("topbar_add_button.add_tax")),1)]),_:1})):d("",!0),i.addMenus.includes("payment_mode")?(r(),o(Ee,{key:16,customType:"menu"},{icon:n(()=>[a(ze)]),default:n(()=>[m("span",null,u(e.$t("topbar_add_button.add_payment_mode")),1)]),_:1})):d("",!0)]),_:1})]),default:n(()=>[k.position=="bottom"?(r(),o(c,{key:0,type:"primary",shape:"circle",style:{width:"50px",height:"50px"}},{icon:n(()=>[a(h)]),_:1})):(r(),o(c,{key:1,type:"link",shape:"round",style:{padding:"0px"}},{icon:n(()=>[a(l)]),_:1}))]),_:1},8,["placement"])],4)}const Ce=L(qn,[["render",In]]);const Fn={components:{MenuOutlined:kn,DownOutlined:ue,HeaderRightIcons:Pn,MenuMode:we,ChangeWarehouse:zn,AffixButton:Ce,ShoppingCartOutlined:oe},setup(e,{emit:t}){const{user:k,appSetting:i,permsArray:S,menuCollapsed:b,willSubscriptionModuleVisible:h,selectedWarehouse:c,appModules:l}=R(),A=I(),g=T(A.state.auth.lang),{locale:p,t:w}=hn(),v=T(window.config.theme_mode!="light"),_=T(!1),C=async y=>{A.commit("auth/updateLang",y),await sn(i18n,y),g.value=y,p.value=y},P=()=>{A.commit("auth/updateMenuCollapsed",!b.value)},$=()=>{A.dispatch("auth/logout")},O=y=>{const M=y?"dark":"light";_.value=!0,axiosAdmin.post("change-theme-mode",{theme_mode:M}).then(W=>{W.data.status=="success"&&window.location.reload(),_.value=!1})};return{selectedWarehouse:c,permsArray:S,appSetting:i,willSubscriptionModuleVisible:h,logout:$,showHideMenu:P,langSelected:C,selectedLang:g,langs:me(()=>A.state.auth.allLangs),appModules:l,user:k,themeMode:v,themeModeChanged:O,themeModeLoading:_,innerWidth:window.innerWidth}}};function Nn(e,t,k,i,S,b){const h=s("MenuOutlined"),c=s("a-space"),l=s("a-col"),A=s("ShoppingCartOutlined"),g=s("a-button"),p=s("a-divider"),w=s("AffixButton"),v=s("ChangeWarehouse"),_=s("DownOutlined"),C=s("a-avatar"),P=s("a-menu-item"),$=s("a-menu"),O=s("a-dropdown"),y=s("HeaderRightIcons"),M=s("a-row"),W=s("a-layout-header");return r(),o(W,{style:{padding:"0 16px",background:"white"}},{default:n(()=>[a(M,null,{default:n(()=>[a(l,{span:4},{default:n(()=>[a(c,null,{default:n(()=>[a(h,{class:"trigger",onClick:i.showHideMenu},null,8,["onClick"])]),_:1})]),_:1}),a(l,{span:20},{default:n(()=>[a(y,null,{default:n(()=>[a(c,null,{default:n(()=>[i.innerWidth>768?(r(!0),B(D,{key:0},H(i.appModules,(K,z)=>(r(),o(U(K+"TopbarIcon"),{key:z}))),128)):d("",!0),i.innerWidth>768&&(i.permsArray.includes("pos_view")||i.permsArray.includes("admin"))&&i.willSubscriptionModuleVisible("pos")?(r(),B(D,{key:1},[a(g,{onClick:t[0]||(t[0]=()=>{e.$router.push({name:"admin.pos.index"})}),type:"link"},{default:n(()=>[a(A),m("span",null,u(e.$t("menu.pos")),1)]),_:1}),a(p,{type:"vertical"})],64)):d("",!0),i.selectedWarehouse&&i.selectedWarehouse.name?(r(),B(D,{key:2},[i.appSetting.shortcut_menus!="bottom"?(r(),B(D,{key:0},[a(w,{position:"top"}),a(p,{type:"vertical"})],64)):d("",!0),a(v),a(p,{type:"vertical"})],64)):d("",!0),a(O,{placement:i.appSetting.rtl?"bottomLeft":"bottomRight"},{overlay:n(()=>[a($,null,{default:n(()=>[(r(!0),B(D,null,H(i.langs,K=>(r(),o(P,{key:K.key,onClick:z=>i.langSelected(K.key)},{default:n(()=>[a(c,null,{default:n(()=>[a(C,{shape:"square",size:"small",src:K.image_url},null,8,["src"]),f(" "+u(K.name),1)]),_:2},1024)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:n(()=>[m("a",{class:"ant-dropdown-link",onClick:t[1]||(t[1]=ie(()=>{},["prevent"]))},[f(u(i.selectedLang)+" ",1),a(_)])]),_:1},8,["placement"]),a(p,{type:"vertical"}),a(g,{type:"link",onClick:t[2]||(t[2]=()=>{e.$router.push({name:"admin.settings.profile.index"})}),class:"p-0"},{default:n(()=>[a(C,{size:"small",src:i.user.profile_image_url},null,8,["src"])]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})}const Oe=L(Fn,[["render",Nn]]);const{Sider:Vn}=V,Jn=q({components:{Sider:Vn,PerfectScrollbar:ce,Layout:V,HomeOutlined:ye,LogoutOutlined:fe,UserOutlined:te,SettingOutlined:_e,CloseOutlined:ge,ShoppingOutlined:ae,ShoppingCartOutlined:oe,AppstoreOutlined:se,ShopOutlined:re,BarChartOutlined:ke,CalculatorOutlined:he,TeamOutlined:le,WalletOutlined:pe,BankOutlined:An,RocketOutlined:vn,LaptopOutlined:bn,CarOutlined:Sn,DollarCircleOutlined:$n},setup(e,{emit:t}){const{appSetting:k,appType:i,user:S,permsArray:b,appModules:h,menuCollapsed:c,willSubscriptionModuleVisible:l}=R(),A=["dashboard","product_manager","stock_management","pos","stock_transfer","stock_adjustment","sales","purchases","expense_manager","users","parties","reports","settings","online_orders","website_setup","cash_bank","subscription","hrm"],g=I(),p=Ae(),w=window.innerWidth,v=T([]),_=T([]),C=T("inline");ve(()=>{var y=typeof p.meta.menuKey=="function"?p.meta.menuKey(p):p.meta.menuKey;p.meta.menuParent=="settings"&&(y="settings"),p.meta.menuParent=="subscription"&&(y="subscription"),p.meta.menuParent=="staff"&&(y="staff"),p.meta.menuParent=="holidays"&&(y="holidays"),p.meta.menuParent=="leaves"&&(y="leaves"),p.meta.menuParent=="attendances"&&(y="attendances"),p.meta.menuParent=="payrolls"&&(y="payrolls"),p.meta.menuParent=="appreciations"&&(y="appreciations"),w<=991?v.value=[]:p.meta.menuParent=="staff"||p.meta.menuParent=="leaves"||p.meta.menuParent=="attendances"||p.meta.menuParent=="payrolls"||p.meta.menuParent=="appreciations"||p.meta.menuParent=="holidays"?v.value=c.value?[]:["hrm"]:v.value=c.value?[]:[p.meta.menuParent],_.value=[y.replace("-","_")]});const P=()=>{g.dispatch("auth/logout")},$=()=>{w<=991&&g.commit("auth/updateMenuCollapsed",!0)},O=y=>{const M=y.find(W=>v.value.indexOf(W)===-1);A.indexOf(M)===-1?v.value=y:v.value=M?[M]:[]};return ne(p,(y,M)=>{const W=typeof y.meta.menuKey=="function"?y.meta.menuKey(y):y.meta.menuKey;w<=991?v.value=[]:y.meta.menuParent=="staff"||y.meta.menuParent=="leaves"||y.meta.menuParent=="attendances"||y.meta.menuParent=="payrolls"||y.meta.menuParent=="appreciations"||y.meta.menuParent=="holidays"?v.value=["hrm"]:v.value=[y.meta.menuParent],y.meta.menuParent=="settings"?_.value=["settings"]:y.meta.menuParent=="subscription"?_.value=["subscription"]:y.meta.menuParent=="staff"?_.value=["staff"]:y.meta.menuParent=="leaves"?_.value=["leaves"]:y.meta.menuParent=="holidays"?_.value=["holidays"]:y.meta.menuParent=="payrolls"?_.value=["payrolls"]:y.meta.menuParent=="attendances"?_.value=["attendances"]:y.meta.menuParent=="appreciations"?_.value=["appreciations"]:_.value=[W.replace("-","_")]}),ne(()=>c.value,(y,M)=>{const W=typeof p.meta.menuKey=="function"?p.meta.menuKey(p):p.meta.menuKey;w<=991&&c.value?v.value=[]:v.value=c.value?[]:[p.meta.menuParent],p.meta.menuParent&&p.meta.menuParent=="settings"?_.value=["settings"]:p.meta.menuParent&&p.meta.menuParent=="subscription"?_.value=["subscription"]:p.meta.menuParent&&p.meta.menuParent=="staff"?_.value=["staff"]:p.meta.menuParent&&p.meta.menuParent=="leaves"?_.value=["leaves"]:p.meta.menuParent&&p.meta.menuParent=="holidays"?_.value=["holidays"]:p.meta.menuParent&&p.meta.menuParent=="payrolls"?_.value=["payrolls"]:p.meta.menuParent&&p.meta.menuParent=="appreciations"?_.value=["appreciations"]:p.meta.menuParent&&p.meta.menuParent=="attendances"?_.value=["attendances"]:_.value=[W.replace("-","_")]}),{mode:C,selectedKeys:_,openKeys:v,logout:P,innerWidth:window.innerWidth,onOpenChange:O,menuSelected:$,menuCollapsed:c,appSetting:k,appType:i,user:S,permsArray:b,appModules:h,willSubscriptionModuleVisible:l}}}),Qn={key:0,class:"logo"},Xn=["src"],Yn={key:1},Gn=["src"],Zn={class:"main-sidebar"};function xn(e,t,k,i,S,b){const h=s("CloseOutlined"),c=s("HomeOutlined"),l=s("a-menu-item"),A=s("TeamOutlined"),g=s("a-sub-menu"),p=s("AppstoreOutlined"),w=s("ShopOutlined"),v=s("ShoppingOutlined"),_=s("CarOutlined"),C=s("CalculatorOutlined"),P=s("ShoppingCartOutlined"),$=s("BankOutlined"),O=s("WalletOutlined"),y=s("UserOutlined"),M=s("BarChartOutlined"),W=s("LaptopOutlined"),K=s("router-link"),z=s("RocketOutlined"),J=s("SettingOutlined"),Q=s("DollarCircleOutlined"),X=s("LogoutOutlined"),Y=s("a-menu"),G=s("perfect-scrollbar"),Z=s("a-layout-sider");return r(),o(Z,{width:240,style:{margin:"0 0 0 0",overflowY:"auto",position:"fixed",paddingTop:"8px",zIndex:998},trigger:null,collapsed:e.menuCollapsed,theme:e.appSetting.left_sidebar_theme,class:"sidebar-right-border"},{default:n(()=>[e.menuCollapsed?(r(),B("div",Qn,[m("img",{style:{height:"32px"},src:e.appSetting.left_sidebar_theme=="dark"?e.appSetting.small_dark_logo_url:e.appSetting.small_light_logo_url},null,8,Xn)])):(r(),B("div",Yn,[m("img",{style:ee({width:"150px",height:"53px",paddingLeft:e.appSetting.rtl?"0px":"30px",paddingRight:e.appSetting.rtl?"30px":"0px",paddingTop:"5px",paddingBottom:"20px",marginLeft:e.appSetting.rtl?"0px":"10px",marginRight:e.appSetting.rtl?"10px":"0px"}),src:e.appSetting.left_sidebar_theme=="dark"?e.appSetting.dark_logo_url:e.appSetting.light_logo_url},null,12,Gn),e.innerWidth<=991?(r(),o(h,{key:0,style:ee({marginLeft:e.appSetting.rtl?"0px":"45px",marginRight:e.appSetting.rtl?"45px":"0px",verticalAlign:"super",color:e.appSetting.left_sidebar_theme=="dark"?"#fff":"#000000"}),onClick:e.menuSelected},null,8,["style","onClick"])):d("",!0)])),m("div",Zn,[a(G,{options:{wheelSpeed:1,swipeEasing:!0,suppressScrollX:!0}},{default:n(()=>[a(Y,{theme:e.appSetting.left_sidebar_theme,openKeys:e.openKeys,selectedKeys:e.selectedKeys,"onUpdate:selectedKeys":t[32]||(t[32]=E=>e.selectedKeys=E),mode:e.mode,onOpenChange:e.onOpenChange,style:{borderRight:"none"}},{default:n(()=>[a(l,{onClick:t[0]||(t[0]=()=>{e.menuSelected(),e.$router.push({name:"admin.dashboard.index"})}),key:"dashboard"},{default:n(()=>[a(c),m("span",null,u(e.$t("menu.dashboard")),1)]),_:1}),e.permsArray.includes("customers_view")||e.permsArray.includes("suppliers_view")||e.permsArray.includes("admin")?(r(),o(g,{key:"parties"},{title:n(()=>[m("span",null,[a(A),m("span",null,u(e.$t("menu.parties")),1)])]),default:n(()=>[e.permsArray.includes("customers_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[1]||(t[1]=()=>{e.menuSelected(),e.$router.push({name:"admin.customers.index"})}),key:"customers"},{default:n(()=>[f(u(e.$t("menu.customers")),1)]),_:1})):d("",!0),e.permsArray.includes("suppliers_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[2]||(t[2]=()=>{e.menuSelected(),e.$router.push({name:"admin.suppliers.index"})}),key:"suppliers"},{default:n(()=>[f(u(e.$t("menu.suppliers")),1)]),_:1})):d("",!0)]),_:1})):d("",!0),e.permsArray.includes("brands_view")||e.permsArray.includes("categories_view")||e.permsArray.includes("variations_view")||e.permsArray.includes("products_view")||e.permsArray.includes("admin")?(r(),o(g,{key:"product_manager"},{title:n(()=>[m("span",null,[a(p),m("span",null,u(e.$t("menu.product_manager")),1)])]),default:n(()=>[e.permsArray.includes("brands_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[3]||(t[3]=()=>{e.menuSelected(),e.$router.push({name:"admin.brands.index"})}),key:"brands"},{default:n(()=>[f(u(e.$t("menu.brands")),1)]),_:1})):d("",!0),e.permsArray.includes("categories_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[4]||(t[4]=()=>{e.menuSelected(),e.$router.push({name:"admin.categories.index"})}),key:"categories"},{default:n(()=>[f(u(e.$t("menu.categories")),1)]),_:1})):d("",!0),e.permsArray.includes("variations_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[5]||(t[5]=()=>{e.menuSelected(),e.$router.push({name:"admin.variations.index"})}),key:"variations"},{default:n(()=>[f(u(e.$t("menu.variations")),1)]),_:1})):d("",!0),e.permsArray.includes("products_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[6]||(t[6]=()=>{e.menuSelected(),e.$router.push({name:"admin.products.index"})}),key:"products"},{default:n(()=>[f(u(e.$t("menu.products")),1)]),_:1})):d("",!0)]),_:1})):d("",!0),e.permsArray.includes("sales_view")||e.permsArray.includes("quotations_view")||e.permsArray.includes("sales_returns_view")||e.permsArray.includes("payment_in_view")||e.permsArray.includes("admin")?(r(),o(g,{key:"sales"},{title:n(()=>[m("span",null,[a(w),m("span",null,u(e.$t("menu.sales")),1)])]),default:n(()=>[e.permsArray.includes("sales_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[7]||(t[7]=()=>{e.menuSelected(),e.$router.push({name:"admin.stock.sales.index"})}),key:"sales"},{default:n(()=>[f(u(e.$t("menu.sales")),1)]),_:1})):d("",!0),(e.permsArray.includes("sales_returns_view")||e.permsArray.includes("admin"))&&e.willSubscriptionModuleVisible("sales_return")?(r(),o(l,{onClick:t[8]||(t[8]=()=>{e.menuSelected(),e.$router.push({name:"admin.stock.sales-returns.index"})}),key:"sales_returns"},{default:n(()=>[f(u(e.$t("menu.sales_returns")),1)]),_:1})):d("",!0),e.permsArray.includes("payment_in_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[9]||(t[9]=()=>{e.menuSelected(),e.$router.push({name:"admin.payments.in"})}),key:"payment_in"},{default:n(()=>[f(u(e.$t("menu.payment_in")),1)]),_:1})):d("",!0),(e.permsArray.includes("quotations_view")||e.permsArray.includes("admin"))&&e.willSubscriptionModuleVisible("quotation")?(r(),o(l,{onClick:t[10]||(t[10]=()=>{e.menuSelected(),e.$router.push({name:"admin.stock.quotations.index"})}),key:"quotations"},{default:n(()=>[f(u(e.$t("menu.quotation_estimate")),1)]),_:1})):d("",!0)]),_:1})):d("",!0),e.permsArray.includes("purchases_view")||e.permsArray.includes("purchase_returns_view")||e.permsArray.includes("payment_out_view")||e.permsArray.includes("admin")?(r(),o(g,{key:"purchases"},{title:n(()=>[m("span",null,[a(v),m("span",null,u(e.$t("menu.purchases")),1)])]),default:n(()=>[e.permsArray.includes("purchases_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[11]||(t[11]=()=>{e.menuSelected(),e.$router.push({name:"admin.stock.purchases.index"})}),key:"purchases"},{default:n(()=>[f(u(e.$t("menu.purchases")),1)]),_:1})):d("",!0),(e.permsArray.includes("purchase_returns_view")||e.permsArray.includes("admin"))&&e.willSubscriptionModuleVisible("purchase_return")?(r(),o(l,{onClick:t[12]||(t[12]=()=>{e.menuSelected(),e.$router.push({name:"admin.stock.purchase-returns.index"})}),key:"purchase_returns"},{default:n(()=>[f(u(e.$t("menu.purchase_returns")),1)]),_:1})):d("",!0),e.permsArray.includes("payment_out_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[13]||(t[13]=()=>{e.menuSelected(),e.$router.push({name:"admin.payments.out"})}),key:"payment_out"},{default:n(()=>[f(u(e.$t("menu.payment_out")),1)]),_:1})):d("",!0)]),_:1})):d("",!0),(e.permsArray.includes("stock_transfers_view")||e.permsArray.includes("admin"))&&e.willSubscriptionModuleVisible("stock_transfer")?(r(),o(l,{onClick:t[14]||(t[14]=()=>{e.menuSelected(),e.$router.push({name:"admin.stock.stock-transfers.index"})}),key:"stock_transfer"},{default:n(()=>[a(_),m("span",null,u(e.$t("menu.stock_transfer")),1)]),_:1})):d("",!0),(e.permsArray.includes("stock_adjustments_view")||e.permsArray.includes("admin"))&&e.willSubscriptionModuleVisible("stock_adjustment")?(r(),o(l,{onClick:t[15]||(t[15]=()=>{e.menuSelected(),e.$router.push({name:"admin.stock_adjustments.index"})}),key:"stock_adjustment"},{default:n(()=>[a(C),m("span",null,u(e.$t("menu.stock_adjustment")),1)]),_:1})):d("",!0),(e.permsArray.includes("pos_view")||e.permsArray.includes("admin"))&&e.willSubscriptionModuleVisible("pos")?(r(),o(l,{onClick:t[16]||(t[16]=()=>{e.menuSelected(),e.$router.push({name:"admin.pos.index"})}),key:"pos"},{default:n(()=>[a(P),m("span",null,u(e.$t("menu.pos")),1)]),_:1})):d("",!0),e.permsArray.includes("cash_bank_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[17]||(t[17]=()=>{e.menuSelected(),e.$router.push({name:"admin.reports.cash_bank.index"})}),key:"cash_bank"},{default:n(()=>[a($),m("span",null,u(e.$t("menu.cash_bank")),1)]),_:1})):d("",!0),(e.permsArray.includes("expense_categories_view")||e.permsArray.includes("expenses_view")||e.permsArray.includes("admin"))&&e.willSubscriptionModuleVisible("expense")?(r(),o(g,{key:"expense_manager"},{title:n(()=>[m("span",null,[a(O),m("span",null,u(e.$t("menu.expense_manager")),1)])]),default:n(()=>[e.permsArray.includes("expense_categories_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[18]||(t[18]=()=>{e.menuSelected(),e.$router.push({name:"admin.expense_categories.index"})}),key:"expense_categories"},{default:n(()=>[f(u(e.$t("menu.expense_categories")),1)]),_:1})):d("",!0),e.permsArray.includes("expenses_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[19]||(t[19]=()=>{e.menuSelected(),e.$router.push({name:"admin.expenses.index"})}),key:"expenses"},{default:n(()=>[f(u(e.$t("menu.expenses")),1)]),_:1})):d("",!0)]),_:1})):d("",!0),(e.permsArray.includes("users_view")||e.permsArray.includes("admin"))&&e.appModules.includes("StockiflyHrm")==!1?(r(),o(l,{onClick:t[20]||(t[20]=()=>{e.menuSelected(),e.$router.push({name:"admin.users.index"})}),key:"users"},{default:n(()=>[a(y),m("span",null,u(e.$t("menu.staff_members")),1)]),_:1})):d("",!0),((e.permsArray.includes("purchases_view")||e.permsArray.includes("sales_view")||e.permsArray.includes("purchase_returns_view")||e.permsArray.includes("sales_returns_view"))&&e.permsArray.includes("order_payments_view")||e.permsArray.includes("products_view")||e.permsArray.includes("customers_view")||e.permsArray.includes("suppliers_view")||e.permsArray.includes("expenses_view")||e.permsArray.includes("admin"))&&e.willSubscriptionModuleVisible("reports")?(r(),o(g,{key:"reports"},{title:n(()=>[m("span",null,[a(M),m("span",null,u(e.$t("menu.reports")),1)])]),default:n(()=>[(e.permsArray.includes("purchases_view")||e.permsArray.includes("sales_view")||e.permsArray.includes("purchase_returns_view")||e.permsArray.includes("sales_returns_view"))&&e.permsArray.includes("order_payments_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[21]||(t[21]=()=>{e.menuSelected(),e.$router.push({name:"admin.reports.payments.index"})}),key:"payments"},{default:n(()=>[f(u(e.$t("menu.payments")),1)]),_:1})):d("",!0),e.permsArray.includes("products_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[22]||(t[22]=()=>{e.menuSelected(),e.$router.push({name:"admin.reports.stock.index"})}),key:"stock_alert"},{default:n(()=>[f(u(e.$t("menu.stock_alert")),1)]),_:1})):d("",!0),e.permsArray.includes("users_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[23]||(t[23]=()=>{e.menuSelected(),e.$router.push({name:"admin.reports.sales_summary.index"})}),key:"sales_summary"},{default:n(()=>[f(u(e.$t("menu.sales_summary")),1)]),_:1})):d("",!0),e.permsArray.includes("products_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[24]||(t[24]=()=>{e.menuSelected(),e.$router.push({name:"admin.reports.stock_summary.index"})}),key:"stock_summary"},{default:n(()=>[f(u(e.$t("menu.stock_summary")),1)]),_:1})):d("",!0),e.permsArray.includes("products_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[25]||(t[25]=()=>{e.menuSelected(),e.$router.push({name:"admin.reports.rate_list.index"})}),key:"rate_list"},{default:n(()=>[f(u(e.$t("menu.rate_list")),1)]),_:1})):d("",!0),e.permsArray.includes("products_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[26]||(t[26]=()=>{e.menuSelected(),e.$router.push({name:"admin.reports.product_sales_summary.index"})}),key:"product_sales_summary"},{default:n(()=>[f(u(e.$t("menu.product_sales_summary")),1)]),_:1})):d("",!0),e.permsArray.includes("customers_view")||e.permsArray.includes("suppliers_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[27]||(t[27]=()=>{e.menuSelected(),e.$router.push({name:"admin.reports.users.index"})}),key:"users_reports"},{default:n(()=>[f(u(e.$t("menu.users_reports")),1)]),_:1})):d("",!0),e.permsArray.includes("expenses_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[28]||(t[28]=()=>{e.menuSelected(),e.$router.push({name:"admin.reports.expenses.index"})}),key:"expense_reports"},{default:n(()=>[f(u(e.$t("menu.expense_reports")),1)]),_:1})):d("",!0),e.permsArray.includes("products_view")&&e.permsArray.includes("purchases_view")&&e.permsArray.includes("sales_view")&&e.permsArray.includes("purchase_returns_view")&&e.permsArray.includes("sales_returns_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:t[29]||(t[29]=()=>{e.menuSelected(),e.$router.push({name:"admin.reports.profit_loss.index"})}),key:"profit_loss"},{default:n(()=>[f(u(e.$t("menu.profit_loss")),1)]),_:1})):d("",!0)]),_:1})):d("",!0),(e.permsArray.includes("online_orders_view")||e.permsArray.includes("admin"))&&e.willSubscriptionModuleVisible("online_store")?(r(),o(l,{onClick:e.menuSelected,key:"online_orders"},{default:n(()=>[a(K,{to:{name:"admin.online_orders.index"}},{default:n(()=>[a(W),m("span",null,u(e.$t("menu.online_orders")),1)]),_:1},8,["to"])]),_:1},8,["onClick"])):d("",!0),(e.permsArray.includes("product_cards_view")||e.permsArray.includes("admin"))&&e.willSubscriptionModuleVisible("online_store")?(r(),o(g,{key:"website_setup"},{title:n(()=>[m("span",null,[a(z),m("span",null,u(e.$t("menu.website_setup")),1)])]),default:n(()=>[e.permsArray.includes("product_cards_view")||e.permsArray.includes("admin")?(r(),o(l,{onClick:e.menuSelected,key:"product_cards"},{default:n(()=>[a(K,{to:{name:"admin.website-setup.product-cards.index"}},{default:n(()=>[f(u(e.$t("menu.product_cards")),1)]),_:1},8,["to"])]),_:1},8,["onClick"])):d("",!0),e.permsArray.includes("front_settings_edit")||e.permsArray.includes("admin")?(r(),o(l,{onClick:e.menuSelected,key:"front_settings"},{default:n(()=>[a(K,{to:{name:"admin.website-setup.front-settings.edit"}},{default:n(()=>[f(u(e.$t("menu.front_settings")),1)]),_:1},8,["to"])]),_:1},8,["onClick"])):d("",!0)]),_:1})):d("",!0),(r(!0),B(D,null,H(e.appModules,(E,x)=>(r(),o(U(E+"Menu"),{key:x,onMenuSelected:e.menuSelected},null,40,["onMenuSelected"]))),128)),a(l,{onClick:t[30]||(t[30]=()=>{e.menuSelected(),e.$router.push({name:"admin.settings.profile.index"})}),key:"settings"},{default:n(()=>[a(J),m("span",null,u(e.$t("menu.settings")),1)]),_:1}),e.appType=="saas"&&e.appSetting.x_admin_id==e.user.xid?(r(),o(l,{onClick:t[31]||(t[31]=()=>{e.menuSelected(),e.$router.push({name:"admin.subscription.current_plan"})}),key:"subscription"},{default:n(()=>[a(Q),m("span",null,u(e.$t("menu.subscription")),1)]),_:1})):d("",!0),a(l,{onClick:e.logout,key:"logout"},{default:n(()=>[a(X),m("span",null,u(e.$t("menu.logout")),1)]),_:1},8,["onClick"])]),_:1},8,["theme","openKeys","selectedKeys","mode","onOpenChange"])]),_:1})])]),_:1},8,["collapsed","theme"])}const Me=L(Jn,[["render",xn]]),{Sider:et}=V,nt=q({props:["collapsed"],components:{Sider:et,PerfectScrollbar:ce,Layout:V,HomeOutlined:ye,LogoutOutlined:fe,UserOutlined:te,SettingOutlined:_e,CloseOutlined:ge,ShoppingOutlined:ae,ShoppingCartOutlined:oe,AppstoreOutlined:se,ShopOutlined:re,BarChartOutlined:ke,CalculatorOutlined:he},setup(e,{emit:t}){const{appSetting:k,user:i,permsArray:S,appModules:b,cssSettings:h}=R(),c=["dashboard","product_manager","stock_management","pos","stock_adjustment","expense_manager","users","reports","settings","online_orders","website_setup"],l=I(),A=Ae(),g=T([]),p=T([]),w=T("horizontal");ve(()=>{P(A)});const v=()=>{l.dispatch("auth/logout")},_=()=>{t("menuSelected")},C=$=>{const O=$.find(y=>g.value.indexOf(y)===-1);c.indexOf(O)===-1?g.value=$:g.value=O?[O]:[]},P=$=>{const O=typeof $.meta.menuKey=="function"?$.meta.menuKey($):$.meta.menuKey;$.meta.menuParent=="settings"?p.value=["settings"]:p.value=[O.replace("-","_")],h.value.headerMenuMode=="horizontal"?g.value=[]:g.value=[$.meta.menuParent]};return ne(A,($,O)=>{P($)}),{mode:w,selectedKeys:p,openKeys:g,logout:v,innerWidth:window.innerWidth,onOpenChange:C,menuSelected:_,appSetting:k,user:i,permsArray:S,appModules:b}}});function tt(e,t,k,i,S,b){const h=s("HomeOutlined"),c=s("a-menu-item"),l=s("AppstoreOutlined"),A=s("a-sub-menu"),g=s("ShopOutlined"),p=s("CalculatorOutlined"),w=s("ShoppingCartOutlined"),v=s("ShoppingOutlined"),_=s("UserOutlined"),C=s("BarChartOutlined"),P=s("SettingOutlined"),$=s("LogoutOutlined"),O=s("a-menu");return r(),o(O,{theme:e.appSetting.left_sidebar_theme,openKeys:e.openKeys,selectedKeys:e.selectedKeys,"onUpdate:selectedKeys":t[19]||(t[19]=y=>e.selectedKeys=y),mode:e.mode,onOpenChange:e.onOpenChange,style:{borderRight:"none"}},{default:n(()=>[a(c,{onClick:t[0]||(t[0]=()=>{e.menuSelected(),e.$router.push({name:"admin.dashboard.index"})}),key:"dashboard"},{default:n(()=>[a(h),m("span",null,u(e.$t("menu.dashboard")),1)]),_:1}),e.permsArray.includes("brands_view")||e.permsArray.includes("categories_view")||e.permsArray.includes("products_view")||e.permsArray.includes("admin")?(r(),o(A,{key:"product_manager"},{title:n(()=>[m("span",null,[a(l),m("span",null,u(e.$t("menu.product_manager")),1)])]),default:n(()=>[e.permsArray.includes("brands_view")||e.permsArray.includes("admin")?(r(),o(c,{onClick:t[1]||(t[1]=()=>{e.menuSelected(),e.$router.push({name:"admin.brands.index"})}),key:"brands"},{default:n(()=>[f(u(e.$t("menu.brands")),1)]),_:1})):d("",!0),e.permsArray.includes("categories_view")||e.permsArray.includes("admin")?(r(),o(c,{onClick:t[2]||(t[2]=()=>{e.menuSelected(),e.$router.push({name:"admin.categories.index"})}),key:"categories"},{default:n(()=>[f(u(e.$t("menu.categories")),1)]),_:1})):d("",!0),e.permsArray.includes("products_view")||e.permsArray.includes("admin")?(r(),o(c,{onClick:t[3]||(t[3]=()=>{e.menuSelected(),e.$router.push({name:"admin.products.index"})}),key:"products"},{default:n(()=>[f(u(e.$t("menu.products")),1)]),_:1})):d("",!0)]),_:1})):d("",!0),e.permsArray.includes("purchases_view")||e.permsArray.includes("sales_view")||e.permsArray.includes("purchase_returns_view")||e.permsArray.includes("sales_returns_view")||e.permsArray.includes("admin")?(r(),o(A,{key:"stock_management"},{title:n(()=>[m("span",null,[a(g),m("span",null,u(e.$t("menu.stock_management")),1)])]),default:n(()=>[e.permsArray.includes("purchases_view")||e.permsArray.includes("admin")?(r(),o(c,{onClick:t[4]||(t[4]=()=>{e.menuSelected(),e.$router.push({name:"admin.stock.purchases.index"})}),key:"purchases"},{default:n(()=>[f(u(e.$t("menu.purchases")),1)]),_:1})):d("",!0),e.permsArray.includes("purchase_returns_view")||e.permsArray.includes("admin")?(r(),o(c,{onClick:t[5]||(t[5]=()=>{e.menuSelected(),e.$router.push({name:"admin.stock.purchase-returns.index"})}),key:"purchase_returns"},{default:n(()=>[f(u(e.$t("menu.purchase_returns")),1)]),_:1})):d("",!0),e.permsArray.includes("sales_view")||e.permsArray.includes("admin")?(r(),o(c,{onClick:t[6]||(t[6]=()=>{e.menuSelected(),e.$router.push({name:"admin.stock.sales.index"})}),key:"sales"},{default:n(()=>[f(u(e.$t("menu.sales")),1)]),_:1})):d("",!0),e.permsArray.includes("sales_returns_view")||e.permsArray.includes("admin")?(r(),o(c,{onClick:t[7]||(t[7]=()=>{e.menuSelected(),e.$router.push({name:"admin.stock.sales-returns.index"})}),key:"sales_returns"},{default:n(()=>[f(u(e.$t("menu.sales_returns")),1)]),_:1})):d("",!0)]),_:1})):d("",!0),e.permsArray.includes("stock_adjustments_view")||e.permsArray.includes("admin")?(r(),o(c,{onClick:t[8]||(t[8]=()=>{e.menuSelected(),e.$router.push({name:"admin.stock_adjustment.index"})}),key:"stock_adjustment"},{default:n(()=>[a(p),m("span",null,u(e.$t("menu.stock_adjustment")),1)]),_:1})):d("",!0),e.permsArray.includes("pos_view")||e.permsArray.includes("admin")?(r(),o(c,{onClick:t[9]||(t[9]=()=>{e.menuSelected(),e.$router.push({name:"admin.pos.index"})}),key:"pos"},{default:n(()=>[a(w),m("span",null,u(e.$t("menu.pos")),1)]),_:1})):d("",!0),e.permsArray.includes("expense_categories_view")||e.permsArray.includes("expenses_view")||e.permsArray.includes("admin")?(r(),o(A,{key:"expense_manager"},{title:n(()=>[m("span",null,[a(v),m("span",null,u(e.$t("menu.expense_manager")),1)])]),default:n(()=>[e.permsArray.includes("expense_categories_view")||e.permsArray.includes("admin")?(r(),o(c,{onClick:t[10]||(t[10]=()=>{e.menuSelected(),e.$router.push({name:"admin.expense_categories.index"})}),key:"expense_categories"},{default:n(()=>[f(u(e.$t("menu.expense_categories")),1)]),_:1})):d("",!0),e.permsArray.includes("expenses_view")||e.permsArray.includes("admin")?(r(),o(c,{onClick:t[11]||(t[11]=()=>{e.menuSelected(),e.$router.push({name:"admin.expenses.index"})}),key:"expenses"},{default:n(()=>[f(u(e.$t("menu.expenses")),1)]),_:1})):d("",!0)]),_:1})):d("",!0),e.permsArray.includes("users_view")||e.permsArray.includes("customers_view")||e.permsArray.includes("suppliers_view")||e.permsArray.includes("admin")?(r(),o(A,{key:"users"},{title:n(()=>[m("span",null,[a(_),m("span",null,u(e.$t("menu.users")),1)])]),default:n(()=>[e.permsArray.includes("users_view")||e.permsArray.includes("admin")?(r(),o(c,{onClick:t[12]||(t[12]=()=>{e.menuSelected(),e.$router.push({name:"admin.users.index"})}),key:"users"},{default:n(()=>[f(u(e.$t("menu.staff_members")),1)]),_:1})):d("",!0),e.permsArray.includes("customers_view")||e.permsArray.includes("admin")?(r(),o(c,{onClick:t[13]||(t[13]=()=>{e.menuSelected(),e.$router.push({name:"admin.customers.index"})}),key:"customers"},{default:n(()=>[f(u(e.$t("menu.customers")),1)]),_:1})):d("",!0),e.permsArray.includes("suppliers_view")||e.permsArray.includes("admin")?(r(),o(c,{onClick:t[14]||(t[14]=()=>{e.menuSelected(),e.$router.push({name:"admin.suppliers.index"})}),key:"suppliers"},{default:n(()=>[f(u(e.$t("menu.suppliers")),1)]),_:1})):d("",!0)]),_:1})):d("",!0),(e.permsArray.includes("purchases_view")||e.permsArray.includes("sales_view")||e.permsArray.includes("purchase_returns_view")||e.permsArray.includes("sales_returns_view"))&&e.permsArray.includes("order_payments_view")||e.permsArray.includes("warehouses_view")||e.permsArray.includes("customers_view")||e.permsArray.includes("suppliers_view")||e.permsArray.includes("admin")?(r(),o(A,{key:"reports"},{title:n(()=>[m("span",null,[a(C),m("span",null,u(e.$t("menu.reports")),1)])]),default:n(()=>[(e.permsArray.includes("purchases_view")||e.permsArray.includes("sales_view")||e.permsArray.includes("purchase_returns_view")||e.permsArray.includes("sales_returns_view"))&&e.permsArray.includes("order_payments_view")||e.permsArray.includes("admin")?(r(),o(c,{onClick:t[15]||(t[15]=()=>{e.menuSelected(),e.$router.push({name:"admin.reports.payments.index"})}),key:"payments"},{default:n(()=>[f(u(e.$t("menu.payments")),1)]),_:1})):d("",!0),e.permsArray.includes("warehouses_view")||e.permsArray.includes("admin")?(r(),o(c,{onClick:t[16]||(t[16]=()=>{e.menuSelected(),e.$router.push({name:"admin.reports.stock.index"})}),key:"stock_alert"},{default:n(()=>[f(u(e.$t("menu.stock_alert")),1)]),_:1})):d("",!0),e.permsArray.includes("customers_view")||e.permsArray.includes("suppliers_view")||e.permsArray.includes("admin")?(r(),o(c,{onClick:t[17]||(t[17]=()=>{e.menuSelected(),e.$router.push({name:"admin.reports.users.index"})}),key:"users_reports"},{default:n(()=>[f(u(e.$t("menu.users_reports")),1)]),_:1})):d("",!0)]),_:1})):d("",!0),(r(!0),B(D,null,H(e.appModules,(y,M)=>(r(),o(U(y+"Menu"),{key:M,onMenuSelected:e.menuSelected},null,40,["onMenuSelected"]))),128)),a(c,{onClick:t[18]||(t[18]=()=>{e.menuSelected(),e.$router.push({name:"admin.settings.profile.index"})}),key:"settings"},{default:n(()=>[a(P),m("span",null,u(e.$t("menu.settings")),1)]),_:1}),a(c,{onClick:e.logout,key:"logout"},{default:n(()=>[a($),m("span",null,u(e.$t("menu.logout")),1)]),_:1},8,["onClick"])]),_:1},8,["theme","openKeys","selectedKeys","mode","onOpenChange"])}const st=L(nt,[["render",tt]]);const rt={components:{TopBar:Oe,LeftSidebarBar:Me,Div:be,MainArea:Se,MainMenus:st,MainContentArea:$e,MainHeader:Tn,MenuMode:we},setup(){const{appSetting:e,cssSettings:t}=R(),k=T(!1);return{collapsed:k,menuClicked:b=>{k.value=b},menuSelected:()=>{innerWidth<=991&&(k.value=!0)},innerWidth:window.innerWidth,appSetting:e,cssSettings:t}}},at={class:"logo"},ot=["src"];function ut(e,t,k,i,S,b){const h=s("a-col"),c=s("MainMenus"),l=s("MenuMode"),A=s("a-row"),g=s("a-layout-header"),p=s("MainHeader"),w=s("router-view"),v=s("MainContentArea"),_=s("a-layout-content"),C=s("a-layout");return r(),o(C,null,{default:n(()=>[a(p,{cssSettings:i.cssSettings},{default:n(()=>[a(g,{class:"main-header"},{default:n(()=>[a(A,null,{default:n(()=>[a(h,{span:1},{default:n(()=>[m("div",at,[m("img",{src:i.appSetting.left_sidebar_theme=="dark"?i.appSetting.small_dark_logo_url:i.appSetting.small_light_logo_url},null,8,ot)])]),_:1}),a(h,{span:20},{default:n(()=>[a(c)]),_:1}),a(h,{span:3},{default:n(()=>[a(l)]),_:1})]),_:1})]),_:1})]),_:1},8,["cssSettings"]),a(_,null,{default:n(()=>[a(v,{cssSettings:i.cssSettings},{default:n(()=>[a(w)]),_:1},8,["cssSettings"])]),_:1})]),_:1})}const it=L(rt,[["render",ut],["__scopeId","data-v-1e8c3fd9"]]),dt={components:{FormOutlined:wn,CrownOutlined:Cn,DoubleRightOutlined:On},setup(){const{appSetting:e,formatDate:t}=R();return{appSetting:e,formatDate:t}}};function lt(e,t,k,i,S,b){const h=s("CrownOutlined"),c=s("a-alert"),l=s("DoubleRightOutlined"),A=s("a-button");return e.$route&&e.$route.meta&&e.$route.meta.menuKey&&e.$route.meta.menuKey!="setup_company"?(r(),B(D,{key:0},[i.appSetting.status=="license_expired"?(r(),o(c,{key:0,message:e.$t("subscription_plans.plan_expired"),description:e.$t("subscription_plans.plan_expired_message",[i.appSetting.licence_expire_on!=""?i.formatDate(i.appSetting.licence_expire_on):""]),type:"error","show-icon":""},{icon:n(()=>[a(h)]),_:1},8,["message","description"])):i.appSetting.subscription_plan&&i.appSetting.subscription_plan.default=="trial"?(r(),o(c,{key:1,message:e.$t("subscription_plans.trial_plan"),description:e.$t("subscription_plans.trial_plan_message",[i.appSetting.licence_expire_on!=""?i.formatDate(i.appSetting.licence_expire_on):""]),type:"warning","show-icon":"",onClose:t[0]||(t[0]=()=>e.$router.push({name:"admin.subscription.change_plan"}))},Mn({icon:n(()=>[a(h)]),_:2},[e.$route.meta&&e.$route.meta.menuParent&&e.$route.meta.menuParent!="subscription"?{name:"closeText",fn:n(()=>[a(A,{type:"primary"},{default:n(()=>[f(u(e.$t("subscription_plans.change_plan"))+" ",1),a(l)]),_:1})]),key:"0"}:void 0]),1032,["message","description"])):d("",!0)],64)):d("",!0)}const pt=L(dt,[["render",lt]]);const mt={components:{TopBar:Oe,LeftSidebarBar:Me,Div:be,MainArea:Se,MainContentArea:$e,AffixButton:Ce,LicenseDetails:pt},setup(){const{appSetting:e,menuCollapsed:t,selectedWarehouse:k,appType:i}=R();return{appType:i,appSetting:e,menuCollapsed:t,selectedWarehouse:k,innerWidth:window.innerWidth}}},ct={id:"components-layout-demo-responsive"};function yt(e,t,k,i,S,b){const h=s("LeftSidebarBar"),c=s("TopBar"),l=s("LicenseDetails"),A=s("router-view"),g=s("a-layout-content"),p=s("AffixButton"),w=s("MainContentArea"),v=s("MainArea"),_=s("a-layout"),C=s("Div");return r(),o(C,null,{default:n(()=>[m("section",ct,[a(_,null,{default:n(()=>[a(h),a(_,null,{default:n(()=>[a(v,{innerWidth:i.innerWidth,collapsed:i.menuCollapsed,isRtl:i.appSetting.rtl},{default:n(()=>[a(c),a(w,null,{default:n(()=>[i.appType=="saas"?(r(),o(l,{key:0})):d("",!0),a(g,null,{default:n(()=>[a(A)]),_:1}),i.appSetting.shortcut_menus!="top"&&i.selectedWarehouse&&i.selectedWarehouse.name?(r(),o(p,{key:1})):d("",!0)]),_:1})]),_:1},8,["innerWidth","collapsed","isRtl"])]),_:1})]),_:1})])]),_:1})}const ft=L(mt,[["render",yt]]),_t={components:{VerticalStyle:ft,HorizantalStyle:it,LoadingApp:rn},setup(){const{cssSettings:e}=R();return{cssSettings:e}}};function gt(e,t,k,i,S,b){return r(),o(Bn,null,[i.cssSettings.headerMenuMode=="horizontal"?(r(),o(U("HorizantalStyle"),{key:"horizontal"})):(r(),o(U("VerticalStyle"),{key:"vertical"}))],1024)}const At=L(_t,[["render",gt]]);export{At as default};
