"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("./useHSModal.cjs.js"),r=require("../../src/modules/HSModal/hsModal.module.css"),s=require("./components/IterableModal/IterableModal.cjs.js"),d=require("./components/MailchimpModal/MailchimpModal.cjs.js"),u=l=>{const{isOpen:n,closeModal:a,handleClick:i,handleOverlayClick:c}=o.useHSModal({id:l.id,initiallyOpen:l.initiallyOpen,trigger:l.trigger,onCloseCallback:l.onCloseCallback,onClickCallback:l.onClickCallback}),t=()=>{switch(l.type){case"mailchimp":return e.jsx(d.MailchimpModal,{...l,onCloseCallback:a,onClickCallback:i});case"iterable":return e.jsx(s.IterableModal,{...l,onCloseCallback:a,onClickCallback:i});default:return null}};return n?e.jsx("div",{className:r.overlay,onClick:c,children:t()}):null};exports.HSModal=u;
