1import{j as n,r as N}from"./react-vendor-SL-tRHvC.js";import{M as W}from"./MainComponents-DWwqGqmq.js";import{w as O}from"./withSectionEditing-Bl9u7lRh.js";import{S as z}from"./SectionInstructions-8YBHdZh2.js";import{r as D}from"./ThemeColorSelect-DPiUZ9SE.js";import{N as f,w as H}from"./StyleControls-9PzlFbwR.js";import{B as U,b as k}from"./ContentControls-BIAsWOQS.js";import"./avatar-Bw2ZdBK7.js";import"./store-eztu3Pi6.js";import"./StyleManager-BZIhYYfd.js";import"./redux-Qh7Rlml1.js";import"./sectionEditRegistry-BM0W9wsU.js";import"./pencil-C8dCj86F.js";import"./createLucideIcon-56rntpSV.js";import"./unlink-CFA7jmzW.js";import"./plus-C-POUpLx.js";import"./chevron-down-BeFL556u.js";import"./circle-alert-CKlg_rxx.js";import"./check-FjGVgs9k.js";import"./AlertHelp-DIcqoKcU.js";import"./circle-check-CszJsGTf.js";import"./circle-x-ChoN1MIl.js";import"./triangle-alert-BJbW5QOR.js";import"./UploadConnect-CmafpPRj.js";import"./Modal-m4HuypgQ.js";import"./transition-EKmAtOVc.js";import"./open-closed-DBPwnwPl.js";import"./dialog-DLLKLTrM.js";import"./use-tab-direction-CcXLPGOI.js";import"./stripe-CVmW8fJ3.js";/* empty css */import"./link-BWqq9sV7.js";import"./loader-circle-BwptMfdK.js";import"./folder-BUnT637h.js";import"./save-B5XrooIh.js";import"./Pagination-DraVxuTZ.js";import"./chevron-left-Dmqcax1d.js";import"./chevron-right-Bo8LCas4.js";import"./image-BkqEL9vQ.js";import"./folder-open-BXX4sNnl.js";import"./layout-grid-gmL3gVfd.js";import"./search-HhhQ6Auh.js";import"./chevron-up-CCP104zo.js";import"./x-CVP4f5iT.js";import"./TipTapEditor-BM_S-g1i.js";import"./index-C7yKKq-w.js";import"./quote-Cuj95cdY.js";import"./trash-2-2YGGvi-E.js";import"./video-BbkJnIj3.js";import"./image-off-BZYHaT8o.js";import"./arrow-up-CO8w1Zp4.js";import"./arrow-down-CXh-1vv8.js";import"./file-text-CBz75DGj.js";import"./globe-mM0CgFle.js";import"./inputClasses-BVopH3EG.js";import"./floating-ui.react-dom-cewGaFvv.js";const I=t=>{switch(t){case"default":default:return"btn-default px-8 py-3 text-lg font-semibold transition-all duration-200 z-20 no-underline";case"inverted":return"btn-inverted px-8 py-3 text-lg font-semibold transition-all duration-200 z-20 no-underline";case"outline":return"btn-outline px-8 py-3 text-lg font-semibold transition-all duration-200 z-20 no-underline";case"outline-inverted":return"btn-outline-inverted px-8 py-3 text-lg font-semibold transition-all duration-200 z-20 no-underline";case"option1":return"btn-option1 px-8 py-3 text-lg font-semibold transition-all duration-200 z-20 no-underline";case"option2":return"btn-option2 px-8 py-3 text-lg font-semibold transition-all duration-200 z-20 no-underline";case"option3":return"btn-option3 px-8 py-3 text-lg font-semibold transition-all duration-200 z-20 no-underline";case"option4":return"btn-option4 px-8 py-3 text-lg font-semibold transition-all duration-200 z-20 no-underline"}};function E({isEditing:t=!1,text:r="Click Here",link:o,buttonStyle:l="default",className:s="",...i}){if(!t&&(!o||!o.page&&!o.customUrl))return null;const a=o.type==="page"?`/${o.page}
1`:o.customUrl,p=o.target||"_self",u=p==="_blank"?"noopener noreferrer":"";return n.jsx("a",{href:a,target:p,rel:u,className:`${I(l)} ${s}`,...i,children:r})}const y={text:"Click Here",buttonStyle:"default"},_=({content:t,isEditing:r})=>{const o=r?t?.link?.buttonText||t?.text||"Click Here":t?.link?.buttonText||t?.text||y.text,l=r?t?.link||{type:"page",page:"",target:"_self",buttonText:"Click Here"}:t?.link||null,s=t?.buttonStyle||y.buttonStyle,i=n.jsx("div",{className:"z-40",children:n.jsx(E,{isEditing:r,text:o,link:l,buttonStyle:s})});return n.jsx(W,{content:t,innerContent:i})},c="Click Here",m=[{value:"default",label:"Solid",paint:{fill:"accent1",words:"accent2",line:"accent2",width:2}},{value:"inverted",label:"Solid reversed",paint:{fill:"accent2",words:"accent1",line:"accent1",width:1}},{value:"outline",label:"Outline",paint:{words:"accent1",line:"accent1",width:2}},{value:"option1",label:"Dark",paint:{fill:"text",words:"bg"}},{value:"option2",label:"Light",paint:{fill:"bg",words:"text"}},{value:"option3",label:"Dark outline",paint:{words:"text",line:"text",width:2}},{value:"option4",label:"Light outline",description:"For dark sections",paint:{words:"bg",line:"bg",width:2},backdrop:"text"}],w={value:"outline-inverted",label:"Outline",description:"Same look as Outline",paint:m[2].paint},d=t=>D(`var(--color-${t})`),$=({paint:t,backdrop:r="bg"})=>n.jsx("div",{"aria-hidden":!0,className:"flex h-9 w-20 items-center justify-center rounded border border-border-light",style:{backgroundColor:d(r)},children:n.jsx("div",{className:"rounded-sm px-2 py-0.5 text-[11px] font-semibold leading-tight",style:{backgroundColor:t.fill?d(t.fill):"transparent",color:d(t.words),border:t.line?`${t.width}px solid ${d(t.line)}`:"2px solid transparent"},children:"Button"})}),A=t=>{const o=(t===w.value?[...m.slice(0,3),w,...m.slice(3)]:m).map(({paint:l,backdrop:s,...i})=>({...i,drawing:n.jsx($,{paint:l,backdrop:s})}));return H(o,t,"Current setting (shows as Solid)")},v=t=>t&&typeof t=="object"&&!Array.isArray(t)?t:null,C=({content:t,handleChange:r,inColumns:o=!1,compact:l=!1})=>{const s=v(t)||{},i=v(s.link),a=i?.buttonText?String(i.buttonText):"",p=s.text?String(s.text):"",[u,x]=N.useState(null),S=u??(a||p),b=s.buttonStyle||"default",g=i&&i.type!=="page"&&i.type!=="custom"&&i.customUrl?{...i,type:"custom"}:i,h=(e,B)=>r("link",{type:e?.type||"page",page:e?.page||"",customUrl:e?.customUrl||"",target:e?.target||"_self",buttonText:B}),j=e=>{x(e),e.trim()!==""&&h(k(g,{buttonText:e}),e)},T=e=>{u===null||e.target?.tagName!=="INPUT"||e.target.type!=="text"||(u.trim()===""&&a!==c&&h(k(g,{buttonText:c}),c),x(null))},L=e=>h(e,a||(p?"":c));return n.jsxs("div",{className:"space-y-6",children:[!l&&n.jsx(z,{title:"How this button works",items:["Shows one button that takes visitors to a page on your site or to another website.","Type the <strong>Words on the button</strong>. If you leave the box empty, the button says Click Here.","In <strong>When someone clicks it, go to</strong>, choose a page or type a website address. The button stays hidden on your site until you do.","Pick a <strong>Button look</strong>. The looks use your site colors."]}),n.jsx("div",{onBlur:T,children:n.jsx(U,{title:"Your button",required:!0,wordsPlaceholder:c,words:S,onWordsChange:j,link:g,onLinkChange:L,look:b,onLookChange:e=>r("buttonStyle",e),lookOptions:A(b),lookHelp:"Solid stands out most. The outline looks are quieter. Light outline is only for dark sections."})}),b==="option4"&&n.jsxs(f,{tone:"warning",children:["Light outline uses your page color for its words and outline, so it only shows up on a dark background. If the button is hard to see, choose another look",o?".":", or open Background in the Design panel below and choose a darker color for this section."]}),!o&&n.jsxs(f,{children:["To move the button left, center or right, open ",n.jsx("strong",{children:"Alignment"})," in the Design panel below."]})]})},F=(t,r,o)=>n.jsx(C,{content:t,handleChange:r,inColumns:!0,compact:!!o?.compact}),P=(t,r)=>n.jsx(C,{content:t,handleChange:r}),q=O(_,P);q.editContent=F;export{q as default,F as editContent};
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.