import{i as o,m as r,g as e,j as n}from"./BfUaJvxP.js";import{s as E}from"./CF1ujZlL.js";const k=E("grav_admin_prefs"),w=[{value:"google-sans",label:"Google Sans",stack:"'Google Sans', ui-sans-serif, system-ui, -apple-system, sans-serif"},{value:"inter",label:"Inter",stack:"'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif"},{value:"public-sans",label:"Public Sans",stack:"'Public Sans', ui-sans-serif, system-ui, -apple-system, sans-serif"},{value:"nunito-sans",label:"Nunito Sans",stack:"'Nunito Sans', ui-sans-serif, system-ui, -apple-system, sans-serif"},{value:"jost",label:"Jost",stack:"'Jost', ui-sans-serif, system-ui, -apple-system, sans-serif"}];function L(t){return(w.find(l=>l.value===t)??w[0]).stack}function P(t){typeof document>"u"||document.documentElement.style.setProperty("--font-sans",L(t))}function C(){try{const t=localStorage.getItem(k);return t?JSON.parse(t):{}}catch{return{}}}function V(){const t=C();let l=o(r(t.pagesViewMode??"tree")),u=o(r(t.pagesPerPage??20)),d=o(r(t.mediaViewMode??"grid")),g=o(r(t.sidebarCollapsed??!1)),p=o(r(t.pageSidebarCollapsed??!1)),m=o(r(t.adminLanguage??"en")),b=o(r(t.editorMode??"normal")),c=o(r(t.menubarLinks??[])),f=o(r(t.logo??{mode:"default",text:"Grav",customLight:"",customDark:""})),S=o(r(t.autoSaveEnabled??!1)),y=o(r(t.autoSaveToolbarUndo??!0)),v=o(r(t.autoSaveBatchWindowMs??0)),i=o(r(t.fontFamily??"google-sans")),M=o(r(t.collabEnabled??!1));P(e(i));function s(){localStorage.setItem(k,JSON.stringify({pagesViewMode:e(l),pagesPerPage:e(u),mediaViewMode:e(d),sidebarCollapsed:e(g),pageSidebarCollapsed:e(p),adminLanguage:e(m),editorMode:e(b),menubarLinks:e(c),logo:e(f),autoSaveEnabled:e(S),autoSaveToolbarUndo:e(y),autoSaveBatchWindowMs:e(v),fontFamily:e(i),collabEnabled:e(M)}))}return{get pagesViewMode(){return e(l)},set pagesViewMode(a){n(l,a,!0),s()},get pagesPerPage(){return e(u)},set pagesPerPage(a){n(u,a,!0),s()},get mediaViewMode(){return e(d)},set mediaViewMode(a){n(d,a,!0),s()},get sidebarCollapsed(){return e(g)},set sidebarCollapsed(a){n(g,a,!0),s()},get pageSidebarCollapsed(){return e(p)},set pageSidebarCollapsed(a){n(p,a,!0),s()},get adminLanguage(){return e(m)},set adminLanguage(a){n(m,a,!0),s()},get editorMode(){return e(b)},set editorMode(a){n(b,a,!0),s()},get menubarLinks(){return e(c)},set menubarLinks(a){n(c,a,!0),s()},get logo(){return e(f)},set logo(a){n(f,a,!0),s()},get autoSaveEnabled(){return e(S)},set autoSaveEnabled(a){n(S,a,!0),s()},get autoSaveToolbarUndo(){return e(y)},set autoSaveToolbarUndo(a){n(y,a,!0),s()},get autoSaveBatchWindowMs(){return e(v)},set autoSaveBatchWindowMs(a){n(v,a,!0),s()},get fontFamily(){return e(i)},set fontFamily(a){n(i,a,!0),P(a),s()},get collabEnabled(){return e(M)},set collabEnabled(a){n(M,a,!0),s()}}}const h=V();export{w as F,h as p};
