import{k as g,aq as x,ar as S,x as b,r as k,c as B,$ as R,Z as C,a0 as l,H as $,S as n,a9 as r,_ as c,q as u,s as z,l as N,v as V}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import{u as q,a5 as D,b as F}from"./naive-ui--dJnpVcV.js?v=1773287522785";import{c as P}from"./index-BTglIPU2.js?v=1773287522785";const A={class:"relative w-full"},E={class:"leading-18px"},H=g({__name:"index",props:{rows:{type:Number,default:4},placeholder:{type:String,default:""},readonly:{type:Boolean,default:!1},name:{type:String,default:""}},emits:["blur"],setup(e,{emit:i}){const d=i,p=x(),a=!!S().default,f=q(),o=b(),m=()=>{o.value.focus()},t=k(!1),_=()=>{t.value=!0},h=()=>{t.value=!1,d("blur")},v=B(()=>!a||p.value?!1:!t.value);return(s,I)=>{const y=F,w=D;return R(),C("div",A,[l(w,{trigger:"focus",placement:"top-start","display-directive":"show",disabled:!a,style:$({"--n-color":n(f).primaryColor,"--n-text-color":"#fff"})},{trigger:r(()=>[l(y,z({ref_key:"inputRef",ref:o},s.$attrs,{type:"textarea",placeholder:e.placeholder,"input-props":{name:e.name,spellcheck:!1},autosize:{minRows:e.rows,maxRows:e.rows},readonly:e.readonly,onFocus:_,onBlur:h}),null,16,["placeholder","input-props","autosize","readonly"])]),default:r(()=>[c("div",E,[u(s.$slots,"default",{},void 0,!0)])]),_:3},8,["disabled","style"]),N(c("div",{class:"placeholder",onClick:m},[u(s.$slots,"default",{},void 0,!0)],512),[[V,n(v)]])])}}}),G=P(H,[["__scopeId","data-v-1d0d33d8"]]);export{G as _};
