"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./main-BB7fFseo.cjs"),f={class:"page-header-view"},y=e.defineComponent({__name:"PageHeader",props:{attrs:{}},setup(d){const a=d,n=e.inject("editable"),u=e.inject("isMobileSize"),c=e.computed(()=>n?!0:!!a.attrs.desc),p=e.computed(()=>e.headerWidget.value.id===e.activeWidgetId.value),s=e.computed(()=>!n||!p.value),l=e.computed({get:()=>a.attrs.title,set:t=>{e.setPageHeaderAttrs("title",t)}}),i=e.computed({get:()=>a.attrs.desc,set:t=>{e.setPageHeaderAttrs("desc",t)}}),g=e.computed(()=>n?"40px 50px":u.value?"30px 20px 10px":"30px 20px 20px"),m=t=>{n&&t.target.select()},v=()=>{const t=l.value||"";t.trim()===""?e.setPageHeaderAttrs("title",e.getSceneFormTitle()):e.setPageHeaderAttrs("title",t)},x=t=>{n&&t.target.select()};return e.watch(()=>a.attrs.title,t=>{e.globalInject.setFormName(t)}),(t,o)=>(e.openBlock(),e.createElementBlock("div",f,[e.createBaseVNode("div",{class:"title-desc-view",style:e.normalizeStyle({padding:g.value})},[e.createVNode(e.unref(e.ElInput),{type:"textarea",autosize:"",resize:"none",modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=r=>l.value=r),maxlength:64,readonly:!e.unref(n),"input-style":{fontSize:"20px",fontWeight:"600",color:"#333333",textAlign:t.attrs.align,scrollbarWidth:"none",...s.value&&{boxShadow:"none",background:"transparent"}},onFocus:m,onBlur:v},null,8,["modelValue","readonly","input-style"]),c.value?(e.openBlock(),e.createBlock(e.unref(e.ElInput),{key:0,modelValue:i.value,"onUpdate:modelValue":o[1]||(o[1]=r=>i.value=r),type:"textarea",autosize:"",resize:"none",placeholder:"请描述你的问卷",readonly:!e.unref(n),style:e.normalizeStyle({marginTop:e.unref(n)?"10px":"0px"}),"input-style":{padding:"10px",fontSize:"14px",scrollbarWidth:"none",textAlign:t.attrs.align,...s.value&&{boxShadow:"none",background:"transparent"}},onFocus:x},null,8,["modelValue","readonly","style","input-style"])):e.createCommentVNode("",!0)],4)]))}}),b=e._export_sfc(y,[["__scopeId","data-v-87c94f3d"]]);exports.default=b;
