"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("lodash-unified");require("../../config-provider/index.js");const r=require("../style/index.js"),d=require("./utils.js"),s=require("../../config-provider/hooks/use-namespace.js"),i={key:0,style:{whiteSpace:"pre-wrap",wordWrap:"break-word",wordBreak:"break-all"}},c=e.defineComponent({name:"ApFieldTextAreaRead",__name:"read",props:{mode:{default:"edit"},class:{},style:{},emptyText:{default:"--"},customReadMode:{},rows:{},autoSize:{type:[Boolean,Object]},onResize:{},onCompositionstart:{},onCompositionend:{},valueModifiers:{},size:{},value:{},name:{},type:{default:"text"},onFocus:{},onBlur:{},onChange:{},onInput:{},onKeydown:{},onKeyup:{},onMousedown:{},focused:{type:Boolean},hidden:{type:Boolean},disabled:{type:Boolean,default:void 0},prefixCls:{},id:{},readonly:{type:Boolean},autofocus:{type:Boolean},variant:{},autocomplete:{},placeholder:{},lazy:{type:Boolean,default:!0},maxlength:{},loading:{type:Boolean},bordered:{type:Boolean,default:!0},showCount:{type:[Boolean,Object]},htmlSize:{},onPressEnter:{},onMouseUp:{},onRawInput:{},"onUpdate:value":{},status:{},defaultValue:{},inputElement:{},triggerFocus:{},handleReset:{},clearIcon:{},allowClear:{type:Boolean,default:!0},beforeInput:{},code:{type:[Boolean,Object],default:!1}},setup(o){const{m:a}=s.useNamespace("field-textarea"),n=r.default("field"),t=o,l=e.computed(()=>{if(t.code)return t.code===!0?{language:"text"}:{language:t.code?.language??"text"}});return(p,f)=>o.code?(e.openBlock(),e.createElementBlock("pre",{key:1,class:e.normalizeClass([e.unref(a)("code"),e.unref(n)])},[e.createElementVNode("code",null,e.toDisplayString(e.unref(d.languageFormat)(o.value,l.value.language)),1)],2)):(e.openBlock(),e.createElementBlock("span",i,e.toDisplayString(e.unref(u.isNil)(o.value)||o.value===""?o.emptyText:o.value),1))}});exports.default=c;
