import{j as r,r as o}from"./router.chunk.YsRm4bSN.js";import{u as s,Z as e,A as n,ai as a,r as t,K as i,x as c,y as l,z as u,aj as d,G as m,M as g,E as p,J as h}from"./main.chunk.N-eZ2ybB.js";import{_ as __}from"./wordpress.chunk.BVds2GcU.js";import{k as j,c as f}from"./forms.chunk.Bz8aaTWe.js";import{M as k}from"./media-field.chunk.B--jhwMa.js";import{R as x}from"./range-slider-field.chunk.lLx6oBQy.js";import{P as w}from"./pro-color-picker-input.chunk.c0Q1A8Ua.js";import{u as b}from"./use-update-dirty-state.chunk.Bh3v76yr.js";import{B}from"./settings.chunk.D9nMP-Um.js";import{u as y}from"./use-route-blocker-guard.chunk.CxzDiMl1.js";import"./react-jsx-runtime.chunk.ATkk6v2S.js";import"./react.js";import"./react-dom-client.chunk.BMQ1litG.js";import"./react-dom.js";import"./pdf-core.chunk.D33I_Wdh.js";import"./ui-radix.chunk.Xzokq_Gv.js";import"./utils.chunk.C1IATKsN.js";import"./icons.chunk.BwnSC3zE.js";import"./date-utils.chunk.DWRtWTmT.js";import"./media.chunk.BUcAGRSV.js";import"./charts.chunk.BbweDdoQ.js";import"./pro-badge.chunk.PstHsVdU.js";import"./template-layout-context.chunk.B1U8ZWnY.js";const C=()=>r.jsxs("div",{className:"growfund-space-y-4",children:[r.jsx(w,{label:__("Button Primary Color","growfund"),placeholder:__("e.g. #000000","growfund"),showProBadge:!0}),r.jsx(w,{label:__("Button Hover Color","growfund"),placeholder:__("e.g. #000000","growfund"),showProBadge:!0}),r.jsx(w,{label:__("Button Text Color","growfund"),placeholder:__("e.g. #000000","growfund"),showProBadge:!0})]}),v=()=>{const{appConfig:w}=s(),v=j({resolver:h(B)});o.useEffect(()=>{v.reset.call(null,{...e(B),...w[n.Branding]??{}})},[w,v.reset]);const{registerForm:N,isCurrentFormDirty:P}=a();o.useEffect(()=>{const r=N(n.Branding,v);return()=>{r()}},[N]),b(v),y({isDirty:P});const E=f({control:v.control,name:"logo_height"}),z=t.get("BrandingColorSelection");return r.jsx(i,{...v,children:r.jsx("div",{className:"growfund-grid growfund-gap-4",children:r.jsxs(c,{children:[r.jsxs(l,{children:[r.jsx(u,{children:__("Branding","growfund")}),r.jsx(d,{children:__("Customize your brand's visual elements.","growfund")})]}),r.jsxs(m,{className:"growfund-grid growfund-grid-cols-2 growfund-gap-6",children:[r.jsxs("div",{className:"growfund-space-y-4",children:[r.jsx(k,{control:v.control,name:"logo",label:__("Logo","growfund"),uploadButtonLabel:__("Upload Image","growfund"),dropzoneLabel:__("Drag and drop, or upload a logo","growfund"),accept:[g.IMAGES],style:{height:`${E||28}px`}}),r.jsx(x,{control:v.control,name:"logo_height",label:__("Height","growfund"),min:20,max:60})]}),r.jsx(p,{fallback:r.jsx(C,{}),children:z&&r.jsx(z,{})})]})]})})})};export{v as default};
