import{i as S,k as x}from"./chunk-OLAR27LK.js";import{r as t}from"./chunk-7YE6IXGM.js";import{a as c,b as n}from"./chunk-CZOGMAXR.js";var l=e=>e.themeEditor,m=t(l,e=>e?.ui),i=t(l,e=>e?.data),d=t(l,e=>e?.domain),f=t(m,e=>e.presetsFilter);var u=t(i,e=>e.settings),T=t(i,e=>e.sourceSettings),g=t(i,e=>e.sourceSettings?.presets),h=t(g,f,(e,r)=>!r||!e?e||[]:Object.keys(e).filter(o=>o.toLowerCase().includes(r?.toLowerCase())).reduce((o,s)=>n(c({},o),{[s]:e[s]}),{})),P=t(g,e=>e?Object.keys(e):[]),a=t(i,u,(e,r)=>r?e.settingsSchema:null),G=t(T,u,(e,r)=>n(c({},e),{current:r}));var p=t(S,e=>e?e.split(","):[]),v=t(p,a,(e,r)=>r?.filter(o=>o.inline===!1).find(o=>e.indexOf(o.name)!==-1)),y=t(P,x,(e,r)=>e?e.reduce((o,s)=>n(c({},o),{[s]:{current:s===r}}),{}):{}),D=t(d,e=>e.isDirty);var z=t(a,p,(e,r)=>e?.reduce((o,s)=>(o[s.name]={opened:r.indexOf(s.name)!==-1&&s.inline!==!1},o),{})),H=t(m,e=>!!(e?.settingsLoading||e?.schemaLoading)),J=t(h,y,(e,r)=>({presets:e,state:r})),K=t(D,e=>[[{title:"Cancel",alias:"cancel",type:"secondary"},{canAction:e,title:"Save settings",alias:"save",type:"primary"}]]);export{f as a,u as b,g as c,a as d,G as e,p as f,v as g,z as h,H as i,J as j,K as k};
