import{j as e,a as s,r as a}from"./router.chunk.YsRm4bSN.js";import{_ as __}from"./wordpress.chunk.BVds2GcU.js";import{x as r,y as n,k as l,aA as o,G as t,c as d,z as c,aj as i,aR as m,aS as u,B as g}from"./main.chunk.N-eZ2ybB.js";import{S as f}from"./separator.chunk.3HcpyIlz.js";const h=s.createContext(null),x=({children:s,emailTemplate:a})=>e.jsx(h,{value:{emailTemplate:a},children:s}),w=()=>{const e=a.use(h);if(!e)throw new Error("useEmailPreviewContext must be used within a EmailPreviewProvider");return e},p=({emailTemplate:s,children:a,className:n})=>e.jsx(x,{emailTemplate:s,children:e.jsx(r,{className:n,style:{backgroundColor:s?.colors?.background??"",color:s?.colors?.text??""},children:a})}),j=({className:s,children:a})=>e.jsx(t,{className:d("growfund-py-4 growfund-px-16 growfund-flex growfund-flex-col growfund-gap-5",s),children:a}),y=({className:s,heading:a})=>{const{emailTemplate:r}=w();return e.jsx(c,{className:d("growfund-pt-6",s),style:{color:r?.colors?.label??""},children:a})},N=({children:s,className:a})=>{const{emailTemplate:r}=w();return"string"==typeof s?e.jsx(i,{className:a,style:{color:r?.colors?.text??""},dangerouslySetInnerHTML:{__html:s}}):e.jsx(i,{className:a,style:{color:r?.colors?.text??""},children:s})},b=({className:s})=>{const{emailTemplate:a}=w();return e.jsx(e.Fragment,{children:a?.content?.additional&&e.jsx("div",{className:d("growfund-mt-4",s),dangerouslySetInnerHTML:{__html:a.content.additional}})})},T=()=>{const{emailTemplate:s}=w();return e.jsxs(e.Fragment,{children:[e.jsx(n,{className:"growfund-py-6 growfund-px-16",children:s?.media?.image?.url?e.jsx("div",{className:"growfund-flex growfund-gap-2 growfund-items-center",style:{justifyContent:s.media.position},children:e.jsx(l,{src:s.media.image.url,alt:"Logo",rounded:"none",style:{height:s.media.height?`${s.media.height}px`:""},className:"growfund-bg-transparent growfund-border-none"})}):e.jsx("div",{className:"growfund-flex growfund-gap-2 growfund-items-center",children:e.jsx(o,{className:"growfund-h-5"})})}),e.jsx(f,{})]})},v=()=>{const{emailTemplate:s}=w(),a=!!s?.content?.footer;return e.jsxs(e.Fragment,{children:[e.jsx(f,{}),e.jsx(u,{className:"growfund-py-6 growfund-px-16 growfund-justify-center",children:a?e.jsx("div",{dangerouslySetInnerHTML:{__html:s.content?.footer??""}}):e.jsx("div",{className:"growfund-text-center growfund-text-base",children:e.jsx("div",{className:"growfund-mb-1 growfund-text-fg-subdued growfund-typo-tiny",children:__("Add footer from default email template.","growfund")})})})]})},k=({className:s})=>{const{emailTemplate:a}=w();return e.jsx(r,{className:d("growfund-bg-background-surface-alt growfund-rounded-lg",s),children:e.jsxs(t,{className:"growfund-mt-2 growfund-space-y-2",style:{color:a?.colors?.text??""},children:[e.jsxs("p",{className:"growfund-typo-small growfund-font-bold",children:[__("February 24th, 2025 by","growfund")," ",e.jsx("span",{className:"growfund-font-normal",children:"Rick Horan"})]}),e.jsx(l,{src:m,alt:"image",className:"growfund-h-[190px]"}),e.jsx("p",{className:"growfund-typo-small ",children:__("Once upon a time in a small town, there lived a brave little girl named Lily. At just eight years old, she faced the biggest challenge of her life: cancer. With her bright smile and unyielding spirit, she fought through countless treatments...","growfund")}),e.jsx(_,{label:__("See Update","growfund")})]})})},_=({label:s,className:a})=>{const{emailTemplate:r}=w();return e.jsx(g,{className:d("growfund-w-full",a),variant:"primary",style:{color:r?.colors?.button??"",backgroundColor:r?.colors?.button_background??""},children:s})};export{p as E,T as a,j as b,y as c,N as d,k as e,b as f,v as g};
