!function(){"use strict";var e=window.wp.blocks,l=window.wp.element,a=(window.wp.i18n,window.wp.blockEditor);window.wp.hooks,window.wp.data,window.lodash;var s=JSON.parse('{"u2":"dragblock/form"}');(0,e.registerBlockType)(s.u2,{usesContext:["dragblockParentStyles"],edit:function(e){const{attributes:s,setAttributes:o,clientId:r}=e;let{dragBlockAttrs:t,dragBlockClientId:u,dragBlockStyles:c}=s;(0,l.useEffect)((()=>{t&&!c&&o({dragBlockAttrs:[{slug:"name",value:u||r},{slug:"method",value:"POST"},{slug:"action",value:"[dragblock.form.action]"}],dragBlockStyles:[{value:"none",slug:"display",selectors:"&.pass .controls"},{value:"block",slug:"display",selectors:"&.pass .pass-msg, &.fail .fail-msg"}],dragBlockClientId:r})}));const g=(0,a.useBlockProps)(),d=(0,a.useInnerBlocksProps)(g,{orientation:"horizontal",renderAppender:!1,templateInsertUpdatesSelection:!1,template:[["dragblock/wrapper",{className:"controls",dragBlockStyles:[{value:"{c=contrast}",slug:"color",selectors:"button:hover"},{value:"100%",slug:"width",selectors:"input, textarea, select"},{value:"10px",slug:"border-radius",selectors:"input, textarea, select"},{value:"10px",slug:"padding",selectors:"input, textarea, select"},{value:"1px solid {c=contrast@}4f",slug:"border",selectors:"input, textarea, select"},{slug:"display",value:"grid"},{slug:"row-gap",value:"30px"},{slug:"column-gap",value:""}]},[["dragblock/text",{dragBlockTagName:"div",className:"fail-msg",dragBlockStyles:[{value:"none",slug:"display"},{value:"10px",slug:"border-radius"},{value:"10px",slug:"padding"},{value:"1px solid #ff3d1f",slug:"border"},{value:"#ff3d1f",slug:"color"},{value:"#e79898",slug:"background-color"},{slug:"row-gap",value:""},{slug:"column-gap",value:""}],dragBlockText:[{slug:"en_US",value:"[dragblock.form.message.error]"}]}],["dragblock/input",{dragBlockAttrs:[{slug:"name",value:"email"},{slug:"type",value:"email"},{slug:"placeholder",value:"Email",locale:"en_US"}],dragBlockStyles:[{value:"1px solid {c=contrast@}4f",slug:"border"},{value:"10px",slug:"padding"}]}],["dragblock/textarea",{dragBlockAttrs:[{value:"*",slug:"required"},{slug:"name",value:"message"},{slug:"placeholder",value:"Message",locale:"en_US"}],dragBlockStyles:[{value:"150px",slug:"height"},{value:"10px",slug:"padding",selectors:""},{value:"1px solid {c=contrast@}4f",slug:"border",selectors:""}]}],["dragblock/text",{dragBlockTagName:"button",dragBlockText:[{slug:"en_US",value:"Summit The Message"}],dragBlockStyles:[{value:"{c=secondary}",slug:"background-color",selectors:":hover"},{value:"{c=base}",slug:"color"},{value:"{c=primary}",slug:"background-color"},{value:"1px solid {c=contrast@}38",slug:"border"},{value:"15px 0px 15px 0px",slug:"padding"},{value:"10px",slug:"border-radius"},{value:"1px 1px 5px 1px {c=contrast@}7d",slug:"box-shadow"}]}]]],["dragblock/text",{dragBlockTagName:"div",dragBlockText:[{slug:"en_US",value:"We received. Thank you!"}],className:"pass-msg",dragBlockStyles:[{value:"none",slug:"display"},{value:"#B6E9A3",slug:"color"},{slug:"font-size",value:"3.5em"}]}]]});return(0,l.createElement)("form",{...d})},save:function(e){const{attributes:s}=e;let o=a.useBlockProps.save();return(0,l.createElement)("form",{...o},(0,l.createElement)(a.InnerBlocks.Content,null))}})}();