import{N as e,a as t,k as n}from"./i18n-BaLR3UdQ.js";import{t as r}from"./options-CDXBc9UM.js";var i=[{id:`new-layout`,name:t(`experimental_features.new_layout_name`),description:t(`experimental_features.new_layout_description`)},{id:`llm`,name:t(`experimental_features.llm_name`),description:t(`experimental_features.llm_description`)}];function a(){return i.filter(t=>!(t.id===`llm`&&e))}var o=null;function s(t){return t===`new-layout`?n()||r.is(`newLayout`):t===`llm`?!e&&r.is(`aiEnabled`):u().has(t)}function c(){let t=[...u().values()];return(n()||r.is(`newLayout`))&&t.push(`new-layout`),!e&&r.is(`aiEnabled`)&&t.push(`llm`),t}async function l(e,t){let n=new Set(u());t?n.add(e):n.delete(e),await r.save(`experimentalFeatures`,JSON.stringify(Array.from(n)))}function u(){if(!o){let e=[];try{e=JSON.parse(r.get(`experimentalFeatures`))}catch(e){console.warn(`Failed to parse experimental features from options:`,e)}o=new Set(e),o.delete(`new-layout`),o.delete(`llm`)}return o}export{l as a,s as i,a as n,c as r,i as t};