"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Edit=void 0;const i18n_1=require("@wordpress/i18n"),classnames_1=__importDefault(require("classnames")),element_1=require("@wordpress/element"),block_templates_1=require("@woocommerce/block-templates"),components_1=require("@woocommerce/components"),block_editor_1=require("@wordpress/block-editor"),sanitize_html_1=require("../../../utils/sanitize-html");function Edit({attributes:e,clientId:t}){const{description:o,title:c,blockGap:r}=e,l=(0,block_templates_1.useWooBlockProps)(e),i=(0,block_editor_1.useInnerBlocksProps)({className:(0,classnames_1.default)("wp-block-woocommerce-product-section__content",`wp-block-woocommerce-product-section__content--block-gap-${r}`)},{templateLock:"all"}),n=c?"fieldset":"div",s="fieldset"===n?"legend":"div",m=`wp-block-woocommerce-product-section__heading-tooltip-${t}`;return(0,element_1.createElement)(n,{...l},c&&(0,element_1.createElement)(s,{className:"wp-block-woocommerce-product-section__heading"},(0,element_1.createElement)("h2",{className:"wp-block-woocommerce-product-section__heading-title"},c,o&&(0,element_1.createElement)(components_1.__experimentalTooltip,{className:m,text:(0,element_1.createElement)("p",{className:"wp-block-woocommerce-product-section__heading-description",dangerouslySetInnerHTML:(0,sanitize_html_1.sanitizeHTML)(o)}),position:"bottom center",helperText:(0,i18n_1.__)("View helper text","woocommerce")}))),(0,element_1.createElement)("div",{...i}))}exports.Edit=Edit;