"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Edit=void 0;const element_1=require("@wordpress/element"),components_1=require("@wordpress/components"),block_editor_1=require("@wordpress/block-editor"),core_data_1=require("@wordpress/core-data"),icons_1=require("@wordpress/icons");function Edit({attributes:e}){const o=(0,block_editor_1.useBlockProps)({className:"woocommerce-product-form__checkbox"}),{property:t,title:r,label:c,tooltip:n}=e,[l,s]=(0,core_data_1.useEntityProp)("postType","product",t);return(0,element_1.createElement)("div",{...o},(0,element_1.createElement)("h4",null,r),(0,element_1.createElement)("div",{className:"woocommerce-product-form__checkbox-wrapper"},(0,element_1.createElement)(components_1.CheckboxControl,{label:c,checked:l,onChange:e=>s(e)}),n&&(0,element_1.createElement)(components_1.Tooltip,{text:(0,element_1.createElement)("span",null,n),position:"top center",className:"woocommerce-product-form__checkbox-tooltip",delay:0},(0,element_1.createElement)("span",{className:"woocommerce-product-form__checkbox-tooltip-icon"},(0,element_1.createElement)(icons_1.Icon,{icon:icons_1.help,size:21.94,fill:"#949494"})))))}exports.Edit=Edit;