import{B as e,F as t,H as n,P as r,Q as i,St as a,Tt as o,n as s,ot as c,p as l,q as u,t as d,w as f,xt as p}from"./_plugin-vue_export-helper-Df3QK1RS.js";import{R as m,h,i as g,t as _}from"./useNavigation-DuqcsgMA.js";var v=d(n({__name:`app-settings`,props:{dialogProps:{}},emits:[`action`],setup(n,{emit:d}){let v=d,{t:y}=f(),b=h(),{appStorageSettings:x}=m(b),{setAppStorageSettings:S}=b,{window1RootFolderId:C,window2RootFolderId:w,navigateToRouteSingle:T}=_(),{fsFolderList:E}=m(g());console.log(`fsFolderList => `,E.value);async function D(e){let t=!x.value[e];if(await S(e,t),t)return;let n=e===`localFoldersDisplaying`?`user-local`:e===`deviceFoldersDisplaying`?`user-device`:`system-`;(C.value.includes(n)||w.value?.includes(n))&&await T({params:{rootFolderId:`user-synced-root`},query:{view:`table`,path:``,activeWindow:`1`}})}return(d,f)=>(i(),t(p(l),u(n.dialogProps,{onAction:f[3]||=e=>v(`action`,e)}),{body:c(()=>[r(`div`,{class:a(d.$style.appSettings)},[r(`div`,{class:a(d.$style.row)},[r(`div`,{class:a(d.$style.label)},o(p(y)(`app.settings.label.folders_local`)),3),r(`div`,{class:a(d.$style.value)},[r(`span`,{class:a(d.$style.text)},o(p(y)(`app.settings.label.off`)),3),e(p(s),{size:`16`,"model-value":!!p(x).localFoldersDisplaying,onChange:f[0]||=e=>D(`localFoldersDisplaying`)},null,8,[`model-value`]),r(`span`,{class:a(d.$style.text)},o(p(y)(`app.settings.label.on`)),3)],2)],2),r(`div`,{class:a(d.$style.row)},[r(`div`,{class:a(d.$style.label)},o(p(y)(`app.settings.label.folders_system`)),3),r(`div`,{class:a(d.$style.value)},[r(`span`,{class:a(d.$style.text)},o(p(y)(`app.settings.label.off`)),3),e(p(s),{size:`16`,"model-value":!!p(x).systemFoldersDisplaying,onChange:f[1]||=e=>D(`systemFoldersDisplaying`)},null,8,[`model-value`]),r(`span`,{class:a(d.$style.text)},o(p(y)(`app.settings.label.on`)),3)],2)],2),r(`div`,{class:a(d.$style.row)},[r(`div`,{class:a(d.$style.label)},o(p(y)(`app.settings.label.folders_device`)),3),r(`div`,{class:a(d.$style.value)},[r(`span`,{class:a(d.$style.text)},o(p(y)(`app.settings.label.off`)),3),e(p(s),{size:`16`,"model-value":!!p(x).deviceFoldersDisplaying,onChange:f[2]||=e=>D(`deviceFoldersDisplaying`)},null,8,[`model-value`]),r(`span`,{class:a(d.$style.text)},o(p(y)(`app.settings.label.on`)),3)],2)],2)],2)]),_:1},16))}}),[[`__cssModules`,{$style:{appSettings:`_appSettings_d4i44_1`,row:`_row_d4i44_7`,label:`_label_d4i44_18`,value:`_value_d4i44_26`,text:`_text_d4i44_34`}}]]);export{v as default};