(()=>{"use strict";var e,o={317(e,o,r){const n=window.wp.blocks,t=window.wp.i18n,l=window.wp.blockEditor,a=window.wp.components,i=window.wp.serverSideRender;var s=r.n(i);const c=window.ReactJSXRuntime,d=JSON.parse('{"UU":"sunflower/contact-form"}');(0,n.registerBlockType)(d.UU,{edit:function({attributes:e,setAttributes:o}){const r=(0,l.useBlockProps)({className:"row"}),{title:n,mailTo:i,requireMail:d,requirePhone:u,displayPhone:f,sendCopy:h}=e;function w(r){return()=>{const n=e[r];o({[r]:!n})}}return(0,c.jsxs)("div",{...r,children:[(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(a.Disabled,{children:(0,c.jsx)(s(),{block:"sunflower/contact-form",attributes:{title:n,requireMail:d,requirePhone:u,displayPhone:f}})})}),(0,c.jsx)(l.InspectorControls,{children:(0,c.jsxs)(a.PanelBody,{title:(0,t.__)("Settings"),children:[(0,c.jsx)("div",{className:"small",children:(0,t.__)("The receiver address may be altered within the Sunflower theme settings. By default, emails are sent to the site administrator.","sunflower-contact-form")}),(0,c.jsx)("br",{}),(0,c.jsx)(a.TextControl,{label:(0,t.__)("Title"),help:(0,t.__)("Title of the form","sunflower-contact-form"),value:n,placeholder:(0,t.__)("Contact Form","sunflower-contact-form"),onChange:e=>{o({title:void 0===e?"":e})}}),(0,c.jsx)(a.TextControl,{label:(0,t.__)("Mail To","sunflower-contact-form"),help:(0,t.__)("Mail form to this address instead of default receiver.","sunflower-contact-form"),value:i,placeholder:(0,t.__)("default receiver","sunflower-contact-form"),type:"email",onChange:e=>{o({mailTo:void 0===e?"":e})}}),(0,c.jsx)(a.ToggleControl,{label:(0,t.__)("Require E-Mail","sunflower-contact-form"),checked:d,onChange:w("requireMail")}),d&&(0,c.jsx)(a.ToggleControl,{label:(0,t.__)("Send copy to sender","sunflower-contact-form"),checked:h,onChange:w("sendCopy")}),(0,c.jsx)(a.ToggleControl,{label:(0,t.__)("Display Phone Field","sunflower-contact-form"),checked:f,onChange:w("displayPhone")}),f&&(0,c.jsx)(a.ToggleControl,{label:(0,t.__)("Require Phone","sunflower-contact-form"),checked:u,onChange:w("requirePhone")})]})})]})}})}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var l=r[e]={exports:{}};return o[e](l,l.exports,n),l.exports}n.m=o,e=[],n.O=(o,r,t,l)=>{if(!r){var a=1/0;for(d=0;d<e.length;d++){for(var[r,t,l]=e[d],i=!0,s=0;s<r.length;s++)(!1&l||a>=l)&&Object.keys(n.O).every(e=>n.O[e](r[s]))?r.splice(s--,1):(i=!1,l<a&&(a=l));if(i){e.splice(d--,1);var c=t();void 0!==c&&(o=c)}}return o}l=l||0;for(var d=e.length;d>0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[r,t,l]},n.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return n.d(o,{a:o}),o},n.d=(e,o)=>{for(var r in o)n.o(o,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},n.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={733:0,481:0};n.O.j=o=>0===e[o];var o=(o,r)=>{var t,l,[a,i,s]=r,c=0;if(a.some(o=>0!==e[o])){for(t in i)n.o(i,t)&&(n.m[t]=i[t]);if(s)var d=s(n)}for(o&&o(r);c<a.length;c++)l=a[c],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return n.O(d)},r=globalThis.webpackChunksunflower=globalThis.webpackChunksunflower||[];r.forEach(o.bind(null,0)),r.push=o.bind(null,r.push.bind(r))})();var t=n.O(void 0,[481],()=>n(317));t=n.O(t)})();