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