(()=>{"use strict";var e,o={317(e,o,r){const t=window.wp.blocks,n=window.wp.i18n,l=window.wp.blockEditor,s=window.wp.components,i=window.wp.serverSideRender;var a=r.n(i);const c=window.ReactJSXRuntime,d=JSON.parse('{"UU":"sunflower/contact-form"}');(0,t.registerBlockType)(d.UU,{edit:function({attributes:e,setAttributes:o}){const r=(0,l.useBlockProps)({className:"row"}),{title:t,mailTo:i,requireMail:d,requirePhone:u,displayPhone:f,sendCopy:h}=e;function m(r){return()=>{const t=e[r];o({[r]:!t})}}return(0,c.jsxs)("div",{...r,children:[(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(s.Disabled,{children:(0,c.jsx)(a(),{block:"sunflower/contact-form",attributes:{title:t,requireMail:d,requirePhone:u,displayPhone:f}})})}),(0,c.jsx)(l.InspectorControls,{children:(0,c.jsxs)(s.PanelBody,{title:(0,n.__)("Settings"),children:[(0,c.jsx)("div",{className:"small",children:(0,n.__)("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)(s.TextControl,{label:(0,n.__)("Title"),help:(0,n.__)("Title of the form","sunflower-contact-form"),value:t,placeholder:(0,n.__)("Contact Form","sunflower-contact-form"),onChange:e=>{o({title:void 0===e?"":e})}}),(0,c.jsx)(s.TextControl,{label:(0,n.__)("Mail To","sunflower-contact-form"),help:(0,n.__)("Mail form to this address instead of default receiver.","sunflower-contact-form"),value:i,placeholder:(0,n.__)("default receiver","sunflower-contact-form"),type:"email",onChange:e=>{o({mailTo:void 0===e?"":e})}}),(0,c.jsx)(s.ToggleControl,{label:(0,n.__)("Require E-Mail","sunflower-contact-form"),checked:d,onChange:m("requireMail")}),d&&(0,c.jsx)(s.ToggleControl,{label:(0,n.__)("Send confirmation to sender","sunflower-contact-form"),help:(0,n.__)("This only sends a short confirmation that the form was submitted successfully. No user content will be included. It is recommended to use a ticket system for detailed confirmations.","sunflower-contact-form"),checked:h,onChange:m("sendCopy")}),(0,c.jsx)(s.ToggleControl,{label:(0,n.__)("Display Phone Field","sunflower-contact-form"),checked:f,onChange:m("displayPhone")}),f&&(0,c.jsx)(s.ToggleControl,{label:(0,n.__)("Require Phone","sunflower-contact-form"),checked:u,onChange:m("requirePhone")})]})})]})}})}},r={};function t(e){var n=r[e];if(void 0!==n)return n.exports;var l=r[e]={exports:{}};return o[e](l,l.exports,t),l.exports}t.m=o,e=[],t.O=(o,r,n,l)=>{if(!r){var s=1/0;for(d=0;d<e.length;d++){for(var[r,n,l]=e[d],i=!0,a=0;a<r.length;a++)(!1&l||s>=l)&&Object.keys(t.O).every(e=>t.O[e](r[a]))?r.splice(a--,1):(i=!1,l<s&&(s=l));if(i){e.splice(d--,1);var c=n();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,n,l]},t.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},t.d=(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},t.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={733:0,481:0};t.O.j=o=>0===e[o];var o=(o,r)=>{var n,l,[s,i,a]=r,c=0;if(s.some(o=>0!==e[o])){for(n in i)t.o(i,n)&&(t.m[n]=i[n]);if(a)var d=a(t)}for(o&&o(r);c<s.length;c++)l=s[c],t.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return t.O(d)},r=globalThis.webpackChunksunflower=globalThis.webpackChunksunflower||[];r.forEach(o.bind(null,0)),r.push=o.bind(null,r.push.bind(r))})();var n=t.O(void 0,[481],()=>t(317));n=t.O(n)})();