import{d as x,bz as h,r as v,az as b,j as r,g as V,o,i as d,k as u,n as c,A as $,di as k,m,p as f,t as w,b as y,h as C,q as g}from"./index-BX34W763.js";import{a as B}from"./DeleteSidebarListElement.vue-BV2fba9G.js";const _={class:"flex flex-1 relative"},M={key:0,class:"select-none whitespace-nowrap text-sm text-transparent"},S={key:1,class:"absolute inset-0 select-none overflow-hidden whitespace-nowrap text-sm"},D={key:0,class:"text-c-2"},E={class:"text-transparent"},z={key:1,class:"text-c-2"},A={},N=x({...A,inheritAttrs:!1,__name:"ScalarTextInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(p){const l=h(p,"modelValue"),n=v(),{classCx:i,otherAttrs:s}=b();return V(()=>{"autofocus"in s.value&&n.value?.focus()}),(e,t)=>(o(),r("div",m(f(i)("bg-b-1.5 flex cursor-text items-center gap-0.75 rounded-md border px-3 py-2.5 outline-offset-[-1px] focus-within:bg-b-1 has-[input:focus-visible]:outline"),{onClick:t[1]||(t[1]=a=>n.value?.focus())}),[d("div",_,[e.$slots.prefix?(o(),r("span",M,[u(e.$slots,"prefix")])):c("",!0),$(d("input",m({ref_key:"input",ref:n,"onUpdate:modelValue":t[0]||(t[0]=a=>l.value=a),class:"z-1 min-w-0 flex-1 border-none bg-transparent text-sm placeholder:font-[inherit] focus-within:outline-none"},f(s)),null,16),[[k,l.value]]),e.$slots.prefix||e.$slots.suffix?(o(),r("div",S,[e.$slots.prefix?(o(),r("span",D,[u(e.$slots,"prefix")])):c("",!0),d("span",E,w(l.value||e.$attrs.placeholder),1),e.$slots.suffix?(o(),r("span",z,[u(e.$slots,"suffix")])):c("",!0)])):c("",!0)]),u(e.$slots,"aside")],16))}}),q=x({__name:"EditSidebarListElement",props:{name:{}},emits:["close","edit"],setup(p,{emit:l}){const n=p,i=l,s=v(n.name);return(e,t)=>(o(),y(B,{onCancel:t[1]||(t[1]=a=>i("close")),onSubmit:t[2]||(t[2]=a=>i("edit",s.value))},{default:C(()=>[g(f(N),{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=a=>s.value=a),autofocus:""},null,8,["modelValue"])]),_:1}))}});export{q as C,N as E};
