!function(){"use strict";var e=window.wp.blocks,n=window.wp.element,o=window.wp.i18n,t=window.wp.blockEditor,r=window.wp.components,a=JSON.parse('{"u2":"wcvendors-pro/store-map-address"}');(0,e.registerBlockType)(a.u2,{edit:function(e){var a=e.attributes,l=e.setAttributes,c=a.title,d=a.showMapHeading,i=a.mapHeading,p=a.showAddressHeading,s=a.addressHeading,u=a.mapWidth,h=a.mapHeight,m=a.zoomLevel,w=a.apiKey,g=a.hideMap,v=a.hideHeading;return(0,n.createElement)("div",(0,t.useBlockProps)(),(0,n.createElement)(r.TextControl,{label:(0,o.__)("Title","wcvendors-pro"),value:c,onChange:function(e){return l({title:e})}}),(0,n.createElement)(r.CheckboxControl,{label:(0,o.__)("Show map heading","wcvendors-pro"),checked:d,onChange:function(e){return l({showMapHeading:e})}}),d&&(0,n.createElement)(r.TextControl,{label:(0,o.__)("Map heading","wcvendors-pro"),value:i,onChange:function(e){return l({mapHeading:e})}}),(0,n.createElement)(r.CheckboxControl,{label:(0,o.__)("Show address heading","wcvendors-pro"),checked:p,onChange:function(e){return l({showAddressHeading:e})}}),p&&(0,n.createElement)(r.TextControl,{label:(0,o.__)("Address heading","wcvendors-pro"),value:s,onChange:function(e){return l({addressHeading:e})}}),(0,n.createElement)(r.TextControl,{label:(0,o.__)("Map height","wcvendors-pro"),value:h,onChange:function(e){return l({mapHeight:e})}}),(0,n.createElement)(r.TextControl,{label:(0,o.__)("Map width","wcvendors-pro"),value:u,onChange:function(e){return l({mapWidth:e})}}),(0,n.createElement)(r.TextControl,{label:(0,o.__)("Zoom level","wcvendors-pro"),value:m,type:"number",max:25,onChange:function(e){e>25&&(e=25),l({zoomLevel:e})},help:(0,o.__)("Max zoom level is 25","wcvendors-pro")}),(0,n.createElement)(r.TextControl,{label:(0,o.__)("Google Map API Key","wcvendors-pro"),value:w,onChange:function(e){return l({apiKey:e})},help:(0,o.__)("Required for your map to work","wcvendors-pro")}),(0,n.createElement)("h4",null," "),(0,n.createElement)(r.ButtonGroup,null,(0,n.createElement)(r.Button,{variant:"secondary",href:"admin.php?page=wcv-settings&tab=forms",target:"_blank"},(0,o.__)("Setup Google Maps API Key","wcvendors-pro")),(0,n.createElement)(r.Button,{variant:"secondary",href:"https://developers.google.com/maps/documentation/javascript/get-api-key",target:"_blank"},(0,o.__)("Get Google Maps API Key","wcvendors-pro"))),(0,n.createElement)("p",null,(0,n.createElement)("i",null,(0,o.__)("Select the maps and places options when creating your key","wcvendors-pro"))),(0,n.createElement)(r.CheckboxControl,{label:(0,o.__)("Hide map","wcvendors-pro"),checked:g,onChange:function(e){return l({hideMap:e})}}),(0,n.createElement)(r.CheckboxControl,{label:(0,o.__)("Hide heading","wcvendors-pro"),checked:v,onChange:function(e){return l({hideHeading:e})}}))}})}();