(()=>{"use strict";const e=window.wp.blocks,t=window.wp.element,l=window.wp.blockEditor,a=window.wp.components,r=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"gutena/textarea-field-group","version":"1.0.0","title":"Textarea","parent":["gutena/forms"],"category":"gutena","icon":"editor-paragraph","description":"Capture longer, multi-line responses such as messages or feedback.","attributes":{"nameAttr":{"type":"string","default":"gf-input-1"},"fieldLabel":{"type":"string","default":"Label"},"fieldLabelContent":{"type":"string","default":""},"fieldType":{"type":"string","default":"textarea"},"isRequired":{"type":"boolean","default":false},"displayName":{"type":"string","default":"Name"},"placeholder":{"type":"string","default":""},"defaultValue":{"type":"string","default":""},"textAreaRows":{"type":"number","default":2},"errorRequiredMsg":{"type":"string","default":"Field is required"},"errorInvalidInputMsg":{"type":"string","default":"Input is not valid"},"description":{"type":"string","default":""},"settings":{"type":"object","default":{}}},"supports":{"__experimentalSettings":true,"align":["wide","full"],"html":false,"spacing":{"margin":true,"padding":true,"blockGap":true},"__experimentalLayout":true},"textdomain":"gutena-forms","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}');(0,e.registerBlockType)(r,{edit:({attributes:e})=>{const a=(0,l.useBlockProps)({className:"wp-block-gutena-field-group"}),r=[["core/group",{layout:{type:"flex",orientation:"vertical",className:"gutena-field-group-row"}},[["gutena/field-label",{level:3,content:e.fieldLabelContent,placeholder:e.fieldLabel,className:"heading-input-label-gutena",htmlFor:""===e.fieldLabelContent?"":e.fieldLabelContent.toLowerCase().replace(/ /g,"_"),lock:{remove:!0,move:!0}}],["gutena/form-field",{fieldType:e.fieldType,fieldName:e.fieldLabelContent,nameAttr:""===e.fieldLabelContent?"":e.fieldLabelContent.toLowerCase().replace(/ /g,"_"),placeholder:e.placeholder,textAreaRows:e.textAreaRows,isRequired:e.isRequired,lock:{remove:!0,move:!0}}]]],["core/paragraph",{className:"gutena-forms-field-error-msg",lock:{remove:!0,move:!0}}]];return(0,t.createElement)("div",a,(0,t.createElement)(l.InnerBlocks,{template:r,allowedBlocks:["core/columns","core/group","core/image","core/paragraph"]}))},save:()=>{const e=l.useBlockProps.save({className:"wp-block-gutena-field-group"});return(0,t.createElement)("div",e,(0,t.createElement)(l.InnerBlocks.Content,null))},icon:()=>(0,t.createElement)(a.Icon,{icon:()=>(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none"},(0,t.createElement)("path",{d:"M9.33333 9.33333V16H11.3333C11.7015 16 12 16.2985 12 16.6667C12 17.0348 11.7015 17.3333 11.3333 17.3333H6C5.63181 17.3333 5.33333 17.0348 5.33333 16.6667C5.33333 16.2985 5.63181 16 6 16H8V9.33333H5.33333V10C5.33333 10.3682 5.03485 10.6667 4.66667 10.6667C4.29848 10.6667 4 10.3682 4 10V8.66667C4 8.29848 4.29848 8 4.66667 8H12.6667C13.0349 8 13.3333 8.29848 13.3333 8.66667V10C13.3333 10.3682 13.0349 10.6667 12.6667 10.6667C12.2985 10.6667 12 10.3682 12 10V9.33333H9.33333ZM16.6667 9.33333C16.2985 9.33333 16 9.03485 16 8.66667C16 8.29848 16.2985 8 16.6667 8H24.6667C26.5076 8 28 9.49239 28 11.3333V22C28 23.8409 26.5076 25.3333 24.6667 25.3333H8.66667C6.82572 25.3333 5.33333 23.8409 5.33333 22V20.6667C5.33333 20.2985 5.63181 20 6 20C6.36819 20 6.66667 20.2985 6.66667 20.6667V22C6.66667 23.1045 7.56209 24 8.66667 24H24.6667C25.7712 24 26.6667 23.1045 26.6667 22V11.3333C26.6667 10.2288 25.7712 9.33333 24.6667 9.33333H16.6667Z",fill:"#0DA88C"}))})})})();