!function(){"use strict";var e={n:function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,{a:r}),r},d:function(t,r){for(var c in r)e.o(r,c)&&!e.o(t,c)&&Object.defineProperty(t,c,{enumerable:!0,get:r[c]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.element,r=window.wp.i18n,c=window.wp.blocks,n=(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 242.5 239.46"},(0,t.createElement)("defs",null,(0,t.createElement)("clipPath",{id:"clip-path",transform:"translate(1.72)"},(0,t.createElement)("circle",{className:"cls-1",cx:"119.73",cy:"119.73",r:"116.15",fill:"none"}))),(0,t.createElement)("g",{id:"Layer_2","data-name":"Layer 2"},(0,t.createElement)("g",{id:"Layer_1","data-name":"Layer 1"},(0,t.createElement)("g",{className:"cls-2",clipPath:"url(#clip-path)"},(0,t.createElement)("circle",{className:"cls-3",cx:"121.45",cy:"119.73",r:"116.15",fill:"#33c6f4"}),(0,t.createElement)("path",{className:"cls-4",d:"M239.32,167.79c-53.41-24-108.37-91.46-113-94.55s-10.84.77-10.84.77c-3.87-6.19-10.06.77-10.06.77C76.77,123.55.14,170.11.14,170.11S36.94,237.79,122,237.79C208.48,237.79,239.32,167.79,239.32,167.79Z",transform:"translate(1.72)",fill:"#1b447e"}),(0,t.createElement)("path",{className:"cls-5",d:"M67.48,116.58s15.48-7,12.38,4.65-15.48,28.64-11.61,29.41S83,140.58,86.06,142.12s5.42.78,3.87,6.2-3.1,9.29,0,9.29,5.42-7,9.29-13.94,10.06-3.87,12.38-1.55,9.29,15.49,14.71,13.94,8.51-8.52,6.19-24,1.55-20.12,1.55-20.12,4.64-2.32,13.16,8.51,24,27.09,26.31,26.32-10.83-17.8-7.74-19.35,15.48,2.32,21.68,7.74c0,0,2.12,8.87,2.12.36L126.31,73.24,115.47,74l-10.06.77S80.64,111.94,67.48,116.58Z",transform:"translate(1.72)",fill:"#fff"}),(0,t.createElement)("path",{className:"cls-6",d:"M239.32,170.11c-53.41-24-108.37-93.78-113-96.87s-10.84.77-10.84.77c-3.87-6.19-10.06.77-10.06.77C76.77,123.55.14,170.11.14,170.11",transform:"translate(1.72)",fill:"none",stroke:"#221e1f",strokeMiterlimit:"10",strokeWidth:"8px"})),(0,t.createElement)("circle",{className:"cls-6",cx:"121.45",cy:"119.73",r:"116.15",fill:"none",stroke:"#1b447e",strokeMiterlimit:"10",strokeWidth:"8px"})))),a=window.wp.apiFetch,o=e.n(a),l=window.wp.compose,s=window.wp.components;const i=new Map;o()({path:"contact-form-7/v1/contact-forms?per_page=20"}).then((e=>{Object.entries(e).forEach((([e,t])=>{i.set(t.id,t)}))}));var m={from:[{type:"shortcode",tag:"contact-form-7",attributes:{id:{type:"integer",shortcode:function(e){var t=e.named.id;return parseInt(t)}},title:{type:"string",shortcode:function(e){return e.named.title}}}}],to:[{type:"block",blocks:["core/shortcode"],transform:function(e){return(0,c.createBlock)("core/shortcode",{text:'[contact-form-7 id="'.concat(e.id,'" title="').concat(e.title,'"]')})}}]};(0,c.registerBlockType)("contact-form-7/contact-form-selector",{title:(0,r.__)("Contact Form 7","contact-form-7"),description:(0,r.__)("Insert a contact form you have created with Contact Form 7.","contact-form-7"),category:"widgets",attributes:{id:{type:"integer"},title:{type:"string"}},icon:n,transforms:m,edit:function e({attributes:c,setAttributes:n}){if(!i.size&&!c.id)return(0,t.createElement)("div",{className:"components-placeholder"},(0,t.createElement)("p",null,(0,r.__)("No contact forms were found. Create a contact form first.","contact-form-7")));const a=Array.from(i.values(),(e=>({value:e.id,label:e.title})));if(c.id)a.length||a.push({value:c.id,label:c.title});else{const e=a[0];c={id:parseInt(e.value),title:e.label}}const o=`contact-form-7-contact-form-selector-${(0,l.useInstanceId)(e)}`;return(0,t.createElement)("div",{className:"components-placeholder"},(0,t.createElement)("label",{htmlFor:o,className:"components-placeholder__label"},(0,r.__)("Select a contact form:","contact-form-7")),(0,t.createElement)(s.SelectControl,{id:o,options:a,value:c.id,onChange:e=>n({id:parseInt(e),title:i.get(parseInt(e)).title})}))},save:function(e){var r=e.attributes;return(0,t.createElement)("div",null,'[contact-form-7 id="',r.id,'" title="',r.title,'"]')}})}();