import{Z as b}from"./navigation-BzNQiq4W.js";import{d as v,a0 as V,r as h,i as r,f as $,o,h as d,j as u,k as c,z as k,au as w,m as x,l as f,t as C,b as g,g as y,n as B}from"./index-DPl1iiyq.js";import{a as S}from"./DeleteSidebarListElement.vue-BDbPRHND.js";const _={class:"flex flex-1 relative"},M={key:0,class:"select-none whitespace-nowrap text-sm text-transparent"},D={key:1,class:"absolute inset-0 select-none overflow-hidden whitespace-nowrap text-sm"},N={key:0,class:"text-c-2"},E={class:"text-transparent"},z={key:1,class:"text-c-2"},A={},U=v({...A,inheritAttrs:!1,__name:"ScalarTextInput",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(p){const l=V(p,"modelValue"),n=h(),{classCx:i,otherAttrs:s}=b();return $(()=>{var e;"autofocus"in s.value&&((e=n.value)==null||e.focus())}),(e,t)=>(o(),r("div",x(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=>{var m;return(m=n.value)==null?void 0:m.focus()})}),[d("div",_,[e.$slots.prefix?(o(),r("span",M,[u(e.$slots,"prefix")])):c("",!0),k(d("input",x({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),[[w,l.value]]),e.$slots.prefix||e.$slots.suffix?(o(),r("div",D,[e.$slots.prefix?(o(),r("span",N,[u(e.$slots,"prefix")])):c("",!0),d("span",E,C(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))}}),P=v({__name:"EditSidebarListElement",props:{name:{}},emits:["close","edit"],setup(p,{emit:l}){const n=p,i=l,s=h(n.name);return(e,t)=>(o(),g(S,{onCancel:t[1]||(t[1]=a=>i("close")),onSubmit:t[2]||(t[2]=a=>i("edit",s.value))},{default:y(()=>[B(f(U),{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=a=>s.value=a),autofocus:""},null,8,["modelValue"])]),_:1}))}});export{P as C,U as N};
