!function(){"use strict";var e,l={87:function(e){e.exports=window.wp.element},427:function(e){e.exports=window.wp.components},715:function(e){e.exports=window.wp.blockEditor},723:function(e){e.exports=window.wp.i18n},790:function(e){e.exports=window.ReactJSXRuntime},873:function(e,l,o){var t=o(723),a=o(715),n=o(427),s=(o(87),o(790));const{registerBlockType:i}=wp.blocks;i("blynex/contact-form-widget",{title:(0,t.__)("Contact Form Widget","blynex"),description:(0,t.__)("A customizable contact form widget with fields for name, email, subject, and message.","blynex"),category:"blynex-blocks",icon:"email",keywords:["contact","form","email","message","widget"],supports:{html:!1,align:["wide","full"],spacing:{margin:!0,padding:!0}},attributes:{formTitle:{type:"string",default:(0,t.__)("Get In Touch","blynex")},formSubtitle:{type:"string",default:(0,t.__)("Feel free to reach out to us","blynex")},showTitle:{type:"boolean",default:!0},showSubtitle:{type:"boolean",default:!0},showNameField:{type:"boolean",default:!0},showEmailField:{type:"boolean",default:!0},showPhoneField:{type:"boolean",default:!1},showSubjectField:{type:"boolean",default:!0},showMessageField:{type:"boolean",default:!0},nameLabel:{type:"string",default:(0,t.__)("Your Name","blynex")},emailLabel:{type:"string",default:(0,t.__)("Your Email","blynex")},phoneLabel:{type:"string",default:(0,t.__)("Your Phone","blynex")},subjectLabel:{type:"string",default:(0,t.__)("Subject","blynex")},messageLabel:{type:"string",default:(0,t.__)("Your Message","blynex")},namePlaceholder:{type:"string",default:(0,t.__)("John Doe","blynex")},emailPlaceholder:{type:"string",default:(0,t.__)("john@example.com","blynex")},phonePlaceholder:{type:"string",default:(0,t.__)("+1 234 567 890","blynex")},subjectPlaceholder:{type:"string",default:(0,t.__)("How can we help?","blynex")},messagePlaceholder:{type:"string",default:(0,t.__)("Write your message here...","blynex")},buttonText:{type:"string",default:(0,t.__)("Send Message","blynex")},buttonAlignment:{type:"string",default:"left"},formStyle:{type:"string",default:"modern"},fieldLayout:{type:"string",default:"stacked"},fieldSpacing:{type:"number",default:20},fieldPadding:{type:"object",default:{top:"12px",right:"16px",bottom:"12px",left:"16px"}},buttonPadding:{type:"object",default:{top:"14px",right:"32px",bottom:"14px",left:"32px"}},fieldBorderRadius:{type:"number",default:8},fieldBorderWidth:{type:"number",default:1},buttonBorderRadius:{type:"number",default:8},titleColor:{type:"string",default:""},subtitleColor:{type:"string",default:""},labelColor:{type:"string",default:""},fieldBackgroundColor:{type:"string",default:""},fieldTextColor:{type:"string",default:""},fieldPlaceholderColor:{type:"string",default:""},fieldBorderColor:{type:"string",default:""},fieldFocusBorderColor:{type:"string",default:""},buttonBackgroundColor:{type:"string",default:""},buttonTextColor:{type:"string",default:""},buttonHoverBackgroundColor:{type:"string",default:""},buttonHoverTextColor:{type:"string",default:""},titleFontSize:{type:"number",default:32},subtitleFontSize:{type:"number",default:16},labelFontSize:{type:"number",default:14},fieldFontSize:{type:"number",default:16},buttonFontSize:{type:"number",default:16},recipientEmail:{type:"string",default:""},successMessage:{type:"string",default:(0,t.__)("Thank you! Your message has been sent successfully.","blynex")},errorMessage:{type:"string",default:(0,t.__)("Oops! Something went wrong. Please try again.","blynex")},enableHoneypot:{type:"boolean",default:!0},showRequiredIndicator:{type:"boolean",default:!0}},edit:({attributes:e,setAttributes:l})=>{const{formTitle:o,formSubtitle:i,showTitle:r,showSubtitle:d,showNameField:c,showEmailField:m,showPhoneField:u,showSubjectField:b,showMessageField:x,nameLabel:f,emailLabel:p,phoneLabel:h,subjectLabel:g,messageLabel:y,namePlaceholder:j,emailPlaceholder:C,phonePlaceholder:_,subjectPlaceholder:v,messagePlaceholder:N,buttonText:F,buttonAlignment:B,formStyle:w,fieldLayout:P,fieldSpacing:S,fieldPadding:k,buttonPadding:T,fieldBorderRadius:z,fieldBorderWidth:L,buttonBorderRadius:$,titleColor:R,subtitleColor:q,labelColor:M,fieldBackgroundColor:E,fieldTextColor:O,fieldPlaceholderColor:H,fieldBorderColor:W,fieldFocusBorderColor:I,buttonBackgroundColor:A,buttonTextColor:Y,buttonHoverBackgroundColor:G,buttonHoverTextColor:J,titleFontSize:D,subtitleFontSize:V,labelFontSize:X,fieldFontSize:K,buttonFontSize:Q,recipientEmail:U,successMessage:Z,errorMessage:ee,enableHoneypot:le,showRequiredIndicator:oe}=e,te=(0,a.useBlockProps)({className:`contact-form-widget style-${w} layout-${P}`}),ae=(0,a.useSetting)("color.palette")||[],ne=k||{top:"12px",right:"16px",bottom:"12px",left:"16px"},se=T||{top:"14px",right:"32px",bottom:"14px",left:"32px"};console.log("Contact Form Colors:",{fieldTextColor:O,fieldPlaceholderColor:H,fieldBackgroundColor:E,titleColor:R,buttonBackgroundColor:A});const ie={"--form-field-spacing":`${S}px`,"--form-field-border-radius":`${z}px`,"--form-field-border-width":`${L}px`,"--form-button-border-radius":`${$}px`,"--form-title-font-size":`${D}px`,"--form-subtitle-font-size":`${V}px`,"--form-label-font-size":`${X}px`,"--form-field-font-size":`${K}px`,"--form-button-font-size":`${Q}px`,...R&&{"--form-title-color":R},...q&&{"--form-subtitle-color":q},...M&&{"--form-label-color":M},...E&&{"--form-field-background-color":E},...O&&{"--form-field-text-color":O},...H&&{"--form-field-placeholder-color":H},...W&&{"--form-field-border-color":W},...I&&{"--form-field-focus-border-color":I},...A&&{"--form-button-background-color":A},...Y&&{"--form-button-text-color":Y},...G&&{"--form-button-hover-background-color":G},...J&&{"--form-button-hover-text-color":J},"--form-field-padding-top":ne.top||"12px","--form-field-padding-right":ne.right||"16px","--form-field-padding-bottom":ne.bottom||"12px","--form-field-padding-left":ne.left||"16px","--form-button-padding-top":se.top||"14px","--form-button-padding-right":se.right||"32px","--form-button-padding-bottom":se.bottom||"14px","--form-button-padding-left":se.left||"32px"};return console.log("Form Styles Object:",ie),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(a.InspectorControls,{children:[(0,s.jsxs)(n.PanelBody,{title:(0,t.__)("Content Settings","blynex"),initialOpen:!0,children:[(0,s.jsx)(n.ToggleControl,{label:(0,t.__)("Show Title","blynex"),checked:r,onChange:e=>l({showTitle:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,t.__)("Show Subtitle","blynex"),checked:d,onChange:e=>l({showSubtitle:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,t.__)("Show Required Indicator (*)","blynex"),checked:oe,onChange:e=>l({showRequiredIndicator:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,t.__)("Field Visibility","blynex"),initialOpen:!1,children:[(0,s.jsx)(n.ToggleControl,{label:(0,t.__)("Show Name Field","blynex"),checked:c,onChange:e=>l({showNameField:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,t.__)("Show Email Field","blynex"),checked:m,onChange:e=>l({showEmailField:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,t.__)("Show Phone Field","blynex"),checked:u,onChange:e=>l({showPhoneField:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,t.__)("Show Subject Field","blynex"),checked:b,onChange:e=>l({showSubjectField:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,t.__)("Show Message Field","blynex"),checked:x,onChange:e=>l({showMessageField:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,t.__)("Field Labels","blynex"),initialOpen:!1,children:[c&&(0,s.jsx)(n.TextControl,{label:(0,t.__)("Name Label","blynex"),value:f,onChange:e=>l({nameLabel:e})}),m&&(0,s.jsx)(n.TextControl,{label:(0,t.__)("Email Label","blynex"),value:p,onChange:e=>l({emailLabel:e})}),u&&(0,s.jsx)(n.TextControl,{label:(0,t.__)("Phone Label","blynex"),value:h,onChange:e=>l({phoneLabel:e})}),b&&(0,s.jsx)(n.TextControl,{label:(0,t.__)("Subject Label","blynex"),value:g,onChange:e=>l({subjectLabel:e})}),x&&(0,s.jsx)(n.TextControl,{label:(0,t.__)("Message Label","blynex"),value:y,onChange:e=>l({messageLabel:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,t.__)("Field Placeholders","blynex"),initialOpen:!1,children:[c&&(0,s.jsx)(n.TextControl,{label:(0,t.__)("Name Placeholder","blynex"),value:j,onChange:e=>l({namePlaceholder:e})}),m&&(0,s.jsx)(n.TextControl,{label:(0,t.__)("Email Placeholder","blynex"),value:C,onChange:e=>l({emailPlaceholder:e})}),u&&(0,s.jsx)(n.TextControl,{label:(0,t.__)("Phone Placeholder","blynex"),value:_,onChange:e=>l({phonePlaceholder:e})}),b&&(0,s.jsx)(n.TextControl,{label:(0,t.__)("Subject Placeholder","blynex"),value:v,onChange:e=>l({subjectPlaceholder:e})}),x&&(0,s.jsx)(n.TextControl,{label:(0,t.__)("Message Placeholder","blynex"),value:N,onChange:e=>l({messagePlaceholder:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,t.__)("Style Settings","blynex"),initialOpen:!1,children:[(0,s.jsx)(n.SelectControl,{label:(0,t.__)("Form Style","blynex"),value:w,options:[{label:(0,t.__)("Modern","blynex"),value:"modern"},{label:(0,t.__)("Classic","blynex"),value:"classic"},{label:(0,t.__)("Minimal","blynex"),value:"minimal"}],onChange:e=>l({formStyle:e})}),(0,s.jsx)(n.SelectControl,{label:(0,t.__)("Field Layout","blynex"),value:P,options:[{label:(0,t.__)("Stacked","blynex"),value:"stacked"},{label:(0,t.__)("Inline (Name & Email)","blynex"),value:"inline"}],onChange:e=>l({fieldLayout:e})}),(0,s.jsx)(n.RangeControl,{label:(0,t.__)("Field Spacing","blynex"),value:S,onChange:e=>l({fieldSpacing:e}),min:0,max:50}),(0,s.jsx)(n.RangeControl,{label:(0,t.__)("Field Border Radius","blynex"),value:z,onChange:e=>l({fieldBorderRadius:e}),min:0,max:50}),(0,s.jsx)(n.RangeControl,{label:(0,t.__)("Field Border Width","blynex"),value:L,onChange:e=>l({fieldBorderWidth:e}),min:0,max:10}),(0,s.jsx)(n.RangeControl,{label:(0,t.__)("Button Border Radius","blynex"),value:$,onChange:e=>l({buttonBorderRadius:e}),min:0,max:50})]}),(0,s.jsxs)(n.PanelBody,{title:(0,t.__)("Spacing","blynex"),initialOpen:!1,children:[(0,s.jsx)(n.__experimentalBoxControl,{label:(0,t.__)("Field Padding","blynex"),values:k,onChange:e=>l({fieldPadding:e})}),(0,s.jsx)(n.__experimentalBoxControl,{label:(0,t.__)("Button Padding","blynex"),values:T,onChange:e=>l({buttonPadding:e})})]}),(0,s.jsxs)(n.PanelBody,{title:(0,t.__)("Button Settings","blynex"),initialOpen:!1,children:[(0,s.jsx)(n.TextControl,{label:(0,t.__)("Button Text","blynex"),value:F,onChange:e=>l({buttonText:e})}),(0,s.jsx)("p",{children:(0,t.__)("Button Alignment","blynex")}),(0,s.jsxs)(n.ButtonGroup,{children:[(0,s.jsx)(n.Button,{isPressed:"left"===B,onClick:()=>l({buttonAlignment:"left"}),children:(0,t.__)("Left","blynex")}),(0,s.jsx)(n.Button,{isPressed:"center"===B,onClick:()=>l({buttonAlignment:"center"}),children:(0,t.__)("Center","blynex")}),(0,s.jsx)(n.Button,{isPressed:"right"===B,onClick:()=>l({buttonAlignment:"right"}),children:(0,t.__)("Right","blynex")})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,t.__)("Typography","blynex"),initialOpen:!1,children:[(0,s.jsx)(n.RangeControl,{label:(0,t.__)("Title Font Size","blynex"),value:D,onChange:e=>l({titleFontSize:e}),min:16,max:72}),(0,s.jsx)(n.RangeControl,{label:(0,t.__)("Subtitle Font Size","blynex"),value:V,onChange:e=>l({subtitleFontSize:e}),min:12,max:32}),(0,s.jsx)(n.RangeControl,{label:(0,t.__)("Label Font Size","blynex"),value:X,onChange:e=>l({labelFontSize:e}),min:10,max:24}),(0,s.jsx)(n.RangeControl,{label:(0,t.__)("Field Font Size","blynex"),value:K,onChange:e=>l({fieldFontSize:e}),min:12,max:24}),(0,s.jsx)(n.RangeControl,{label:(0,t.__)("Button Font Size","blynex"),value:Q,onChange:e=>l({buttonFontSize:e}),min:12,max:24})]}),(0,s.jsxs)(n.PanelBody,{title:(0,t.__)("Colors","blynex"),initialOpen:!1,children:[(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,t.__)("Title Color","blynex")}),(0,s.jsx)(a.ColorPalette,{value:R,onChange:e=>l({titleColor:e}),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,t.__)("Subtitle Color","blynex")}),(0,s.jsx)(a.ColorPalette,{value:q,onChange:e=>l({subtitleColor:e}),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,t.__)("Label Color","blynex")}),(0,s.jsx)(a.ColorPalette,{value:M,onChange:e=>l({labelColor:e}),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,t.__)("Field Background Color","blynex")}),(0,s.jsx)(a.ColorPalette,{value:E,onChange:e=>l({fieldBackgroundColor:e}),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,t.__)("Field Text Color","blynex")}),(0,s.jsx)(a.ColorPalette,{value:O,onChange:e=>l({fieldTextColor:e}),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,t.__)("Field Placeholder Color","blynex")}),(0,s.jsx)(a.ColorPalette,{value:H,onChange:e=>l({fieldPlaceholderColor:e}),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,t.__)("Field Border Color","blynex")}),(0,s.jsx)(a.ColorPalette,{value:W,onChange:e=>l({fieldBorderColor:e}),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,t.__)("Field Focus Border Color","blynex")}),(0,s.jsx)(a.ColorPalette,{value:I,onChange:e=>l({fieldFocusBorderColor:e}),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,t.__)("Button Background Color","blynex")}),(0,s.jsx)(a.ColorPalette,{value:A,onChange:e=>l({buttonBackgroundColor:e}),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,t.__)("Button Text Color","blynex")}),(0,s.jsx)(a.ColorPalette,{value:Y,onChange:e=>l({buttonTextColor:e}),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,t.__)("Button Hover Background Color","blynex")}),(0,s.jsx)(a.ColorPalette,{value:G,onChange:e=>l({buttonHoverBackgroundColor:e}),colors:ae,disableCustomColors:!1})]}),(0,s.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,s.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:(0,t.__)("Button Hover Text Color","blynex")}),(0,s.jsx)(a.ColorPalette,{value:J,onChange:e=>l({buttonHoverTextColor:e}),colors:ae,disableCustomColors:!1})]})]}),(0,s.jsxs)(n.PanelBody,{title:(0,t.__)("Email Settings","blynex"),initialOpen:!1,children:[(0,s.jsx)(n.TextControl,{label:(0,t.__)("Recipient Email","blynex"),value:U,onChange:e=>l({recipientEmail:e}),help:(0,t.__)("Email address to receive form submissions. Leave empty to use admin email.","blynex")}),(0,s.jsx)(n.TextControl,{label:(0,t.__)("Success Message","blynex"),value:Z,onChange:e=>l({successMessage:e})}),(0,s.jsx)(n.TextControl,{label:(0,t.__)("Error Message","blynex"),value:ee,onChange:e=>l({errorMessage:e})}),(0,s.jsx)(n.ToggleControl,{label:(0,t.__)("Enable Honeypot Protection","blynex"),checked:le,onChange:e=>l({enableHoneypot:e}),help:(0,t.__)("Helps prevent spam submissions","blynex")})]})]}),(0,s.jsx)("div",{...te,style:ie,children:(0,s.jsx)("div",{className:"contact-form-container",children:(0,s.jsxs)("form",{className:"blynex-contact-form",children:[r&&(0,s.jsx)(a.RichText,{tagName:"h2",className:"form-title",value:o,onChange:e=>l({formTitle:e}),placeholder:(0,t.__)("Enter form title...","blynex")}),d&&(0,s.jsx)(a.RichText,{tagName:"p",className:"form-subtitle",value:i,onChange:e=>l({formSubtitle:e}),placeholder:(0,t.__)("Enter form subtitle...","blynex")}),(0,s.jsxs)("div",{className:"form-fields",children:["inline"===P&&(c||m)&&(0,s.jsxs)("div",{className:"form-row inline",children:[c&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-name",children:[f,oe&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"contact-name",name:"contact_name",className:"field-input",placeholder:j,disabled:!0})]}),m&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-email",children:[p,oe&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"email",id:"contact-email",name:"contact_email",className:"field-input",placeholder:C,disabled:!0})]})]}),"stacked"===P&&c&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-name",children:[f,oe&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"contact-name",name:"contact_name",className:"field-input",placeholder:j,disabled:!0})]}),"stacked"===P&&m&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-email",children:[p,oe&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"email",id:"contact-email",name:"contact_email",className:"field-input",placeholder:C,disabled:!0})]}),u&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsx)("label",{className:"field-label",htmlFor:"contact-phone",children:h}),(0,s.jsx)("input",{type:"tel",id:"contact-phone",name:"contact_phone",className:"field-input",placeholder:_,disabled:!0})]}),b&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-subject",children:[g,oe&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"contact-subject",name:"contact_subject",className:"field-input",placeholder:v,disabled:!0})]}),x&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-message",children:[y,oe&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("textarea",{id:"contact-message",name:"contact_message",className:"field-input field-textarea",placeholder:N,rows:"5",disabled:!0})]}),le&&(0,s.jsx)("input",{type:"text",name:"contact_website",className:"honeypot-field",tabIndex:"-1",autoComplete:"off"}),(0,s.jsx)("input",{type:"hidden",name:"action",value:"blynex_contact_form_submit"}),(0,s.jsx)("input",{type:"hidden",name:"nonce",value:"",className:"contact-form-nonce"})]}),(0,s.jsx)("div",{className:`form-submit align-${B}`,children:(0,s.jsx)("button",{type:"submit",className:"submit-button",disabled:!0,children:F})}),(0,s.jsxs)("div",{className:"form-messages",children:[(0,s.jsx)("div",{className:"form-message success-message",style:{display:"none"},children:Z}),(0,s.jsx)("div",{className:"form-message error-message",style:{display:"none"},children:ee})]})]})})})]})},save:({attributes:e})=>{const{formTitle:l,formSubtitle:o,showTitle:t,showSubtitle:n,showNameField:i,showEmailField:r,showPhoneField:d,showSubjectField:c,showMessageField:m,nameLabel:u,emailLabel:b,phoneLabel:x,subjectLabel:f,messageLabel:p,namePlaceholder:h,emailPlaceholder:g,phonePlaceholder:y,subjectPlaceholder:j,messagePlaceholder:C,buttonText:_,buttonAlignment:v,formStyle:N,fieldLayout:F,fieldSpacing:B,fieldPadding:w,buttonPadding:P,fieldBorderRadius:S,fieldBorderWidth:k,buttonBorderRadius:T,titleColor:z,subtitleColor:L,labelColor:$,fieldBackgroundColor:R,fieldTextColor:q,fieldPlaceholderColor:M,fieldBorderColor:E,fieldFocusBorderColor:O,buttonBackgroundColor:H,buttonTextColor:W,buttonHoverBackgroundColor:I,buttonHoverTextColor:A,titleFontSize:Y,subtitleFontSize:G,labelFontSize:J,fieldFontSize:D,buttonFontSize:V,recipientEmail:X,successMessage:K,errorMessage:Q,enableHoneypot:U,showRequiredIndicator:Z}=e,ee=(a.useBlockProps.save({className:`contact-form-widget style-${N} layout-${F}`}),w||{top:"12px",right:"16px",bottom:"12px",left:"16px"}),le=P||{top:"14px",right:"32px",bottom:"14px",left:"32px"},oe={"--form-field-spacing":`${B}px`,"--form-field-border-radius":`${S}px`,"--form-field-border-width":`${k}px`,"--form-button-border-radius":`${T}px`,"--form-title-font-size":`${Y}px`,"--form-subtitle-font-size":`${G}px`,"--form-label-font-size":`${J}px`,"--form-field-font-size":`${D}px`,"--form-button-font-size":`${V}px`,...z&&{"--form-title-color":z},...L&&{"--form-subtitle-color":L},...$&&{"--form-label-color":$},...R&&{"--form-field-background-color":R},...q&&{"--form-field-text-color":q},...M&&{"--form-field-placeholder-color":M},...E&&{"--form-field-border-color":E},...O&&{"--form-field-focus-border-color":O},...H&&{"--form-button-background-color":H},...W&&{"--form-button-text-color":W},...I&&{"--form-button-hover-background-color":I},...A&&{"--form-button-hover-text-color":A},"--form-field-padding-top":ee.top||"12px","--form-field-padding-right":ee.right||"16px","--form-field-padding-bottom":ee.bottom||"12px","--form-field-padding-left":ee.left||"16px","--form-button-padding-top":le.top||"14px","--form-button-padding-right":le.right||"32px","--form-button-padding-bottom":le.bottom||"14px","--form-button-padding-left":le.left||"32px"},te=a.useBlockProps.save({className:`contact-form-widget style-${N} layout-${F}`,style:oe});return(0,s.jsx)("div",{...te,children:(0,s.jsx)("div",{className:"contact-form-container",children:(0,s.jsxs)("form",{className:"blynex-contact-form",method:"post","data-recipient":X,children:[t&&(0,s.jsx)(a.RichText.Content,{tagName:"h2",className:"form-title",value:l}),n&&(0,s.jsx)(a.RichText.Content,{tagName:"p",className:"form-subtitle",value:o}),(0,s.jsxs)("div",{className:"form-fields",children:["inline"===F&&(i||r)&&(0,s.jsxs)("div",{className:"form-row inline",children:[i&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-name",children:[u,Z&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"contact-name",name:"contact_name",className:"field-input",placeholder:h,required:!0})]}),r&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-email",children:[b,Z&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"email",id:"contact-email",name:"contact_email",className:"field-input",placeholder:g,required:!0})]})]}),"stacked"===F&&i&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-name",children:[u,Z&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"contact-name",name:"contact_name",className:"field-input",placeholder:h,required:!0})]}),"stacked"===F&&r&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-email",children:[b,Z&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"email",id:"contact-email",name:"contact_email",className:"field-input",placeholder:g,required:!0})]}),d&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsx)("label",{className:"field-label",htmlFor:"contact-phone",children:x}),(0,s.jsx)("input",{type:"tel",id:"contact-phone",name:"contact_phone",className:"field-input",placeholder:y})]}),c&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-subject",children:[f,Z&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"contact-subject",name:"contact_subject",className:"field-input",placeholder:j,required:!0})]}),m&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-message",children:[p,Z&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("textarea",{id:"contact-message",name:"contact_message",className:"field-input field-textarea",placeholder:C,rows:"5",required:!0})]}),U&&(0,s.jsx)("input",{type:"text",name:"contact_website",className:"honeypot-field",tabIndex:"-1",autoComplete:"off"}),(0,s.jsx)("input",{type:"hidden",name:"action",value:"blynex_contact_form_submit"}),(0,s.jsx)("input",{type:"hidden",name:"nonce",value:"",className:"contact-form-nonce"})]}),(0,s.jsx)("div",{className:`form-submit align-${v}`,children:(0,s.jsx)("button",{type:"submit",className:"submit-button","data-text":_,children:(0,s.jsx)("span",{children:_})})}),(0,s.jsxs)("div",{className:"form-messages",children:[(0,s.jsx)("div",{className:"form-message success-message",style:{display:"none"},children:K}),(0,s.jsx)("div",{className:"form-message error-message",style:{display:"none"},children:Q})]})]})})})},save:({attributes:e})=>{const{formTitle:l,formSubtitle:o,showTitle:t,showSubtitle:n,showNameField:i,showEmailField:r,showPhoneField:d,showSubjectField:c,showMessageField:m,nameLabel:u,emailLabel:b,phoneLabel:x,subjectLabel:f,messageLabel:p,namePlaceholder:h,emailPlaceholder:g,phonePlaceholder:y,subjectPlaceholder:j,messagePlaceholder:C,buttonText:_,buttonAlignment:v,formStyle:N,fieldLayout:F,fieldSpacing:B,fieldPadding:w,buttonPadding:P,fieldBorderRadius:S,fieldBorderWidth:k,buttonBorderRadius:T,titleColor:z,subtitleColor:L,labelColor:$,fieldBackgroundColor:R,fieldTextColor:q,fieldPlaceholderColor:M,fieldBorderColor:E,fieldFocusBorderColor:O,buttonBackgroundColor:H,buttonTextColor:W,buttonHoverBackgroundColor:I,buttonHoverTextColor:A,titleFontSize:Y,subtitleFontSize:G,labelFontSize:J,fieldFontSize:D,buttonFontSize:V,successMessage:X,errorMessage:K,enableHoneypot:Q,showRequiredIndicator:U}=e,Z=a.useBlockProps.save({className:`contact-form-widget style-${N} layout-${F}`}),ee=w||{top:"12px",right:"16px",bottom:"12px",left:"16px"},le=P||{top:"14px",right:"32px",bottom:"14px",left:"32px"},oe={"--form-field-spacing":`${B}px`,"--form-field-border-radius":`${S}px`,"--form-field-border-width":`${k}px`,"--form-button-border-radius":`${T}px`,"--form-title-font-size":`${Y}px`,"--form-subtitle-font-size":`${G}px`,"--form-label-font-size":`${J}px`,"--form-field-font-size":`${D}px`,"--form-button-font-size":`${V}px`,...z&&{"--form-title-color":z},...L&&{"--form-subtitle-color":L},...$&&{"--form-label-color":$},...R&&{"--form-field-background-color":R},...q&&{"--form-field-text-color":q},...M&&{"--form-field-placeholder-color":M},...E&&{"--form-field-border-color":E},...O&&{"--form-field-focus-border-color":O},...H&&{"--form-button-background-color":H},...W&&{"--form-button-text-color":W},...I&&{"--form-button-hover-background-color":I},...A&&{"--form-button-hover-text-color":A},"--form-field-padding-top":ee.top||"12px","--form-field-padding-right":ee.right||"16px","--form-field-padding-bottom":ee.bottom||"12px","--form-field-padding-left":ee.left||"16px","--form-button-padding-top":le.top||"14px","--form-button-padding-right":le.right||"32px","--form-button-padding-bottom":le.bottom||"14px","--form-button-padding-left":le.left||"32px"};return(0,s.jsx)("div",{...Z,style:oe,children:(0,s.jsx)("div",{className:"contact-form-container",children:(0,s.jsxs)("form",{className:"blynex-contact-form",children:[t&&(0,s.jsx)(a.RichText.Content,{tagName:"h2",className:"form-title",value:l}),n&&(0,s.jsx)(a.RichText.Content,{tagName:"p",className:"form-subtitle",value:o}),(0,s.jsxs)("div",{className:"form-fields",children:["inline"===F&&(i||r)&&(0,s.jsxs)("div",{className:"form-row inline",children:[i&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-name",children:[u,U&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"contact-name",name:"contact_name",className:"field-input",placeholder:h,required:!0})]}),r&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-email",children:[b,U&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"email",id:"contact-email",name:"contact_email",className:"field-input",placeholder:g,required:!0})]})]}),"stacked"===F&&i&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-name",children:[u,U&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"contact-name",name:"contact_name",className:"field-input",placeholder:h,required:!0})]}),"stacked"===F&&r&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-email",children:[b,U&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"email",id:"contact-email",name:"contact_email",className:"field-input",placeholder:g,required:!0})]}),d&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsx)("label",{className:"field-label",htmlFor:"contact-phone",children:x}),(0,s.jsx)("input",{type:"tel",id:"contact-phone",name:"contact_phone",className:"field-input",placeholder:y})]}),c&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-subject",children:[f,U&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("input",{type:"text",id:"contact-subject",name:"contact_subject",className:"field-input",placeholder:j,required:!0})]}),m&&(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsxs)("label",{className:"field-label",htmlFor:"contact-message",children:[p,U&&(0,s.jsx)("span",{className:"required",children:"*"})]}),(0,s.jsx)("textarea",{id:"contact-message",name:"contact_message",className:"field-input field-textarea",placeholder:C,rows:"5",required:!0})]}),Q&&(0,s.jsx)("input",{type:"text",name:"contact_website",className:"honeypot-field",tabIndex:"-1",autoComplete:"off"}),(0,s.jsx)("input",{type:"hidden",name:"action",value:"blynex_contact_form_submit"}),(0,s.jsx)("input",{type:"hidden",name:"nonce",value:"",className:"contact-form-nonce"})]}),(0,s.jsx)("div",{className:`form-submit align-${v}`,children:(0,s.jsx)("button",{type:"submit",className:"submit-button","data-text":_,children:(0,s.jsx)("span",{children:_})})}),(0,s.jsxs)("div",{className:"form-messages",children:[(0,s.jsx)("div",{className:"form-message success-message",style:{display:"none"},children:X}),(0,s.jsx)("div",{className:"form-message error-message",style:{display:"none"},children:K})]})]})})})}})}},o={};function t(e){var a=o[e];if(void 0!==a)return a.exports;var n=o[e]={exports:{}};return l[e](n,n.exports,t),n.exports}t.m=l,e=[],t.O=function(l,o,a,n){if(!o){var s=1/0;for(c=0;c=n)&&Object.keys(t.O).every((function(e){return t.O[e](o[r])}))?o.splice(r--,1):(i=!1,n0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[o,a,n]},t.n=function(e){var l=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(l,{a:l}),l},t.d=function(e,l){for(var o in l)t.o(l,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:l[o]})},t.o=function(e,l){return Object.prototype.hasOwnProperty.call(e,l)},function(){var e={798:0,350:0};t.O.j=function(l){return 0===e[l]};var l=function(l,o){var a,n,s=o[0],i=o[1],r=o[2],d=0;if(s.some((function(l){return 0!==e[l]}))){for(a in i)t.o(i,a)&&(t.m[a]=i[a]);if(r)var c=r(t)}for(l&&l(o);d