import{g as e}from"./useStore.js?v=1761009159";import{w as l,c as s,r as t,g as a,q as n,n as i,e as c,I as o,H as r}from"./base-lib.js?v=1761009159";const u=s({name:"ConfigRow",directives:{selectLighting:{async mounted(s,t){const{refs:{settingSearch:a}}=e();l(()=>a.value,e=>{const l=new RegExp(e,"gi");if(s.classList.contains("desc")){s.querySelectorAll("span").forEach(e=>{const s=e.innerText;if(s.match(l)){const t=s.replace(l,e=>'<i class="setingLight not-italic bg-[yellow]">'.concat(e,"</i>"));e.innerHTML=t}})}else{const e=s.innerText;if(e.match(l)){const t=e.replace(l,e=>'<i class="setingLight not-italic bg-[yellow]">'.concat(e,"</i>"));s.innerHTML=t}}})}}},props:{label:{type:String,default:""}},setup(l,{slots:s}){const{refs:{settingSearch:u}}=e(),{label:g}=l,v=t(null),d=t(""),f=a(()=>{let e=!0;return e=""===u.value||(!!d.value.includes(u.value)||!!l.label.includes(u.value)),e});return n(()=>{i(()=>{v.value&&(d.value=v.value.innerText)})}),()=>c("section",{class:"config-rows",title:g,style:"display: ".concat(f.value?"flex":"none")},[c("div",{class:"label text-small"},[(null==s?void 0:s.label)?null==s?void 0:s.label():o(c("span",null,[g]),[[r("select-lighting")]])]),c("div",{class:"value"},[s.value?s.value():null]),o(c("div",{ref:v,class:"desc text-tertiary text-small"},[s.desc?s.desc():null]),[[r("select-lighting")]])])}});export{u as C};
