1import{c as t,b as e}from"./element-plus.80abf16b.js";import{c1 as a,bM as o,bR as s,bQ as n,bK as i,c2 as d,c3 as l,ca as r,bP as m,c7 as p,c8 as c,cb as u,cp as f,cc as b,cd as g,bI as v,ev as x,ce as y,cf as h}from"./commonmodules.b9c1dd40.js";import{D as S}from"./model.73a2fd91.js";import{_ as I,u as L,a as _}from"./index.d3bd9396.js";import"./lodash-es.480d1bd8.js";import"./axios.1263d4b1.js";import"./vue-router.5e13d197.js";const k=["id"];var z=I(a({__name:"Button",props:{domId:null,componentData:null,save:{type:Function}},setup(a){const I=a;x((t=>({"5be18d66":m(N).borderColor,"733e63c0":m(N).buttonColor,"51eec676":m(N).textColor,c5b730d0:m(C)})));const z=L(),N=o(S),j=o(null),C=o("0");s((()=>{I.componentData&&(N.value={..._.deepCopy(S),...JSON.parse(I.componentData)})})),n((()=>I.componentData),(t=>{t&&(N.value={...S,...JSON.parse(I.componentData)})}));const R=i((()=>{if(0!=N.value.marginLeft&&!N.value.isLink){const t=document.getElementById(`btn-${I.domId}`);if(t){const e=N.value.marginLeft>j.value.offsetWidth-t.offsetWidth;return e&&(C.value=`-${N.value.marginLeft-(j.value.offsetWidth-t.offsetWidth)}px`),e}}}));return i((()=>!!(null==z?void 0:z.state.render.isPreview))),(o,s)=>{var n,i,x,S,I,L;const z=t,C=e;return d(),l(v,null,[r("div",{id:a.domId,style:f({textAlign:m(N).align}),ref_key:"buttonWrapper",ref:j},[(null==(n=m(N))?void 0:n.isLink)?(d(),p(z,{key:0,class:u(m(N).className),style:f({color:m(N).buttonColor,fontFamily:null!=(i=m(N).fontName)?i:"",fontSize:null!=(x=m(N).fontSize)?x:""}),onClick:s[0]||(s[0]=t=>m(_).gotoUrl(t,m(N).href,m(N).openInNewTab))},{default:c((()=>[y(h(m(N).name),1)])),_:1},8,["class","style"])):(d(),p(C,{key:1,size:null==(S=m(N))?void 0:S.selectedSize,id:`btn-${a.domId}`,class:u([m(N).isAcross?"camps-btn-w100":"",m(N).className,"camps-button-custom-style",m(R)&&"camps-button-translate"]),onClick:s[1]||(s[1]=t=>m(_).gotoUrl(t,m(N).href,m(N).openInNewTab)),style:f({borderRadius:m(N).borderRadius+"px",borderWidth:m(N).borderSize+"px",paddingTop:m(N).paddingTop+"px",paddingLeft:m(N).paddingLeft+"px",paddingRight:m(N).paddingRight+"px",paddingBottom:m(N).paddingBottom+"px",marginTop:m(N).marginTop+"px",marginLeft:m(N).isAcross?"0":m(N).marginLeft+"px",marginRight:m(N).isAcross?"0":m(N).marginRight+"px",marginBottom:m(N).marginBottom+"px",fontFamily:null!=(I=m(N).fontName)?I:"",fontSize:null!=(L=m(N).fontSize)?L:""})},{default:c((()=>[y(h(m(N).name),1)])),_:1},8,["size","id","class","style"]))],12,k),m(N).customJS?(d(),p(b("script"),{key:0},{default:c((()=>[y(h(m(N).customJS),1)])),_:1})):g("",!0)],64)}}}),[["__scopeId","data-v-079fa5ba"]]);export{z as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.