import{t as e}from"./react-CRXH2-jv.js";import{t}from"./middleware-Pd0e8Igk.js";import{r as n}from"./siteStore-BLhBstND.js";var r=e()(t((e,t)=>({sidebarCollapsed:!1,toggleSidebar:()=>e(e=>({sidebarCollapsed:!e.sidebarCollapsed})),setSidebarCollapsed:t=>e({sidebarCollapsed:t}),postLayout:`grid`,setPostLayout:t=>e({postLayout:t}),adminNavHidden:!1,setAdminNavHidden:t=>e({adminNavHidden:t}),loaded:!1,loadConfig:async()=>{let t=n.getState().config.postLayout;if(t&&[`grid`,`list`,`magazine`].includes(t)){e({postLayout:t,loaded:!0});return}e({loaded:!0})},saveConfig:async r=>{let i={postLayout:t().postLayout,...r};return await n.getState().saveConfig({postLayout:i.postLayout})?(e({...i,loaded:!0}),!0):!1}}),{name:`ui-preferences`,partialize:e=>({sidebarCollapsed:e.sidebarCollapsed,postLayout:e.postLayout})}));export{r as t};