import{k as a,ay as e,ae as s,x as l,r as t,c as o,U as r,V as d,Q as p,a2 as u,s as i,W as n,q as c,I as f,X as m,l as v,v as y}from"./vue.js?v=1753954525509";import{ab as g,e as _}from"./page_layout.js?v=1753954525509";import{aq as h,c3 as w}from"./naive.js?v=1753954525509";const x={class:"relative w-full"},b={class:"leading-18px"},k=_(a({__name:"index",props:{rows:{type:Number,default:4},placeholder:{type:String,default:""},readonly:{type:Boolean,default:!1},name:{type:String,default:""}},emits:["blur"],setup(a,{emit:_}){const k=_,j=e(),R=!!s().default,$=g(),q=l(),z=()=>{q.value.focus()},B=t(!1),C=()=>{B.value=!0},I=()=>{B.value=!1,k("blur")},S=o((()=>!!R&&(!j.value&&!B.value)));return(e,s)=>{const l=h,t=w;return r(),d("div",x,[p(t,{trigger:"focus",placement:"top-start","display-directive":"show",disabled:!R,style:f({"--n-color":m($).primaryColor,"--n-text-color":"#fff"})},{trigger:u((()=>[p(l,i({ref_key:"inputRef",ref:q},e.$attrs,{type:"textarea",placeholder:a.placeholder,"input-props":{name:a.name,spellcheck:!1},autosize:{minRows:a.rows,maxRows:a.rows},readonly:a.readonly,onFocus:C,onBlur:I}),null,16,["placeholder","input-props","autosize","readonly"])])),default:u((()=>[n("div",b,[c(e.$slots,"default",{},void 0,!0)])])),_:3},8,["disabled","style"]),v(n("div",{class:"placeholder",onClick:z},[c(e.$slots,"default",{},void 0,!0)],512),[[y,m(S)]])])}}}),[["__scopeId","data-v-1d0d33d8"]]);export{k as _};
