import{u as y,a as w}from"./ReferenceContentLoader-34zh6S1n.js";import{R as _,d as x,b,o,w as v,r as u,m,u as n,a6 as $,h as C,i as V,y as h,C as k,a as f,c as d,j as c,E as S,a7 as B,t as M,e as D}from"./index-CDPBytck.js";import{a as E}from"./DeleteSidebarListElement.vue-BOkQGL8v.js";const A=Symbol(),N=()=>_(A,!1),j={},I=x({...j,inheritAttrs:!1,__name:"ScalarFormInput",props:{is:{default:"button"}},setup(i){const{cx:a}=y(),s=N(),l=w({base:["bg-b-1.5 flex items-center text-c-2 gap-0.75 px-3 py-2.5 ","outline-offset-[-1px] has-[:focus-visible]:outline"],variants:{grouped:{true:"first:rounded-t-[inherit] last:rounded-b-[inherit]",false:"rounded border"},button:{true:"cursor-pointer hover:bg-b-2"}}});return(t,p)=>(o(),b($(t.is),m({type:t.is==="button"?"button":void 0},n(a)(n(l)({button:t.is==="button",grouped:n(s)}))),{default:v(()=>[u(t.$slots,"default")]),_:3},16,["type"]))}}),z={class:"flex flex-1 relative"},U={key:0,class:"select-none whitespace-nowrap text-sm text-transparent"},F=["readonly","aria-readonly"],L={key:1,class:"absolute inset-0 select-none overflow-hidden whitespace-nowrap text-sm"},P={key:0,class:"text-c-2"},R={class:"text-transparent"},T={key:1,class:"text-c-2"},q={},G=x({...q,inheritAttrs:!1,__name:"ScalarTextInput",props:C({readonly:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(i){const a=V(i,"modelValue"),s=h(),{classCx:l,otherAttrs:t}=y();k(()=>{"autofocus"in t.value&&s.value?.focus()});function p(){i.readonly?s.value?.select():s.value?.focus()}return(e,r)=>(o(),b(n(I),m({is:"div"},n(l)("cursor-text text-c-1",e.readonly?"":"focus-within:bg-b-1"),{onClick:p}),{default:v(()=>[f("div",z,[e.$slots.prefix?(o(),d("span",U,[u(e.$slots,"prefix")])):c("",!0),S(f("input",m({ref_key:"input",ref:s,"onUpdate:modelValue":r[0]||(r[0]=g=>a.value=g),readonly:e.readonly,"aria-readonly":e.readonly||void 0,class:"z-1 min-w-0 flex-1 border-none bg-transparent text-sm placeholder:font-[inherit] focus-within:outline-none"},n(t)),null,16,F),[[B,a.value]]),e.$slots.prefix||e.$slots.suffix?(o(),d("div",L,[e.$slots.prefix?(o(),d("span",P,[u(e.$slots,"prefix")])):c("",!0),f("span",R,M(a.value||e.$attrs.placeholder),1),e.$slots.suffix?(o(),d("span",T,[u(e.$slots,"suffix")])):c("",!0)])):c("",!0)]),u(e.$slots,"aside")]),_:3},16))}}),O=x({__name:"EditSidebarListElement",props:{name:{}},emits:["close","edit"],setup(i,{emit:a}){const s=i,l=a,t=h(s.name);return(p,e)=>(o(),b(E,{onCancel:e[1]||(e[1]=r=>l("close")),onSubmit:e[2]||(e[2]=r=>l("edit",t.value))},{default:v(()=>[D(n(G),{modelValue:t.value,"onUpdate:modelValue":e[0]||(e[0]=r=>t.value=r),autofocus:""},null,8,["modelValue"])]),_:1}))}});export{O as C,G as j};
