import{E as e,H as t,Ht as n,Lt as r,Q as i,R as a,W as o,Z as s,_ as c,b as l,f as u,g as d,gt as f,ut as p,v as m,w as h,y as g}from"./vue.runtime.esm-bundler-56z_v_HH.js";import{a as _,i as v}from"./vue-router-_izWfDzq.js";import{t as y}from"./user.store-DPFu8pQI.js";import{t as b}from"./global.store-BNqBuUdA.js";import{n as x}from"./vue-i18n-DhldrKy8.js";var S={class:`w-full mb-6 select-wrapper xl:hidden`},C={class:`flex gap-8`},w={class:`hidden mt-1 xl:block min-w-[240px] sticky top-20 self-start`},T={class:`mr-3`},E={class:`w-full overflow-visible`},D=e({__name:`SettingsLayoutView`,setup(e){let{t:D}=x(),O=b(),k=y(),A=v(),j=_(),M=d(()=>k.currentUser?.is_owner===!0),N=p(void 0),P=d(()=>{let e=O.settingMenu.map(e=>({...e,title:D(e.title)}));return M.value&&e.push({title:D(`settings.company_info.danger_zone`),link:`/admin/settings/danger-zone`,icon:`ExclamationTriangleIcon`}),e});s(()=>{if(A.path===`/admin/settings`){let e=O.settingMenu?.[0];j.push(e?.link??`/admin/settings/account-settings`)}N.value=P.value.find(e=>e.link===A.path)});function F(e){return A.path.indexOf(e)>-1}function I(e){j.push(e.link)}return(e,s)=>{let d=o(`BaseBreadcrumbItem`),p=o(`BaseBreadcrumb`),_=o(`BasePageHeader`),v=o(`BaseMultiselect`),y=o(`BaseIcon`),b=o(`BaseListItem`),x=o(`BaseList`),D=o(`router-link`),k=o(`RouterView`),A=o(`BasePage`);return a(),m(A,null,{default:i(()=>[h(_,{title:e.$t(`settings.setting`,1),class:`mb-6`},{default:i(()=>[h(p,null,{default:i(()=>[h(d,{title:e.$t(`general.home`),to:`/admin/dashboard`},null,8,[`title`]),h(d,{title:e.$t(`settings.setting`,2),to:`/admin/settings`,active:``},null,8,[`title`])]),_:1})]),_:1},8,[`title`]),c(`div`,S,[h(v,{modelValue:N.value,"onUpdate:modelValue":[s[0]||=e=>N.value=e,I],options:P.value,"can-deselect":!1,"value-prop":`title`,"track-by":`title`,label:`title`,object:``},null,8,[`modelValue`,`options`])]),c(`div`,C,[c(`div`,w,[h(x,null,{default:i(()=>[(a(!0),l(u,null,t(f(O).settingMenu,(t,n)=>(a(),m(b,{key:n,title:e.$t(t.title),to:t.link,active:F(t.link),index:n,class:`py-3`},{icon:i(()=>[h(y,{name:t.icon},null,8,[`name`])]),_:2},1032,[`title`,`to`,`active`,`index`]))),128))]),_:1}),M.value?(a(),m(D,{key:0,to:`/admin/settings/danger-zone`,class:r([`cursor-pointer px-3 py-2 mt-1 text-sm font-medium leading-5 flex items-center rounded-lg transition-colors`,F(`/admin/settings/danger-zone`)?`text-red-600 bg-red-50 font-semibold`:`text-red-500 hover:bg-red-50 hover:text-red-600`])},{default:i(()=>[c(`span`,T,[h(y,{name:`ExclamationTriangleIcon`})]),c(`span`,null,n(e.$t(`settings.company_info.danger_zone`)),1)]),_:1},8,[`class`])):g(``,!0)]),c(`div`,E,[h(k)])])]),_:1})}}});export{D as default};