import{k as a,aw as e,ag as s,x as l,r as t,c as o,R as r,S as d,X as p,a3 as u,s as i,U as n,q as c,I as f,V as m,l as v,v as y}from"./vue.js?v=1763625242172";import{au as g,dh as h}from"./naive.js?v=1763625242172";import{ap as w,p as _}from"./page_layout.js?v=1763625242172";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=_,R=e(),j=!!s().default,S=w(),$=l(),z=()=>{$.value.focus()},B=t(!1),C=()=>{B.value=!0},I=()=>{B.value=!1,k("blur")},q=o((()=>!!j&&(!R.value&&!B.value)));return(e,s)=>{const l=g,t=h;return r(),d("div",x,[p(t,{trigger:"focus",placement:"top-start","display-directive":"show",disabled:!j,style:f({"--n-color":m(S).primaryColor,"--n-text-color":"#fff"})},{trigger:u((()=>[p(l,i({ref_key:"inputRef",ref:$},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(q)]])])}}}),[["__scopeId","data-v-1d0d33d8"]]);export{k as _};
