"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 t=(0,block_editor_1.useBlockProps)({className:"woocommerce-product-form__checkbox"}),{property:o,title:r,label:l,tooltip:c}=e,[n,s]=(0,core_data_1.useEntityProp)("postType","product",o);return(0,element_1.createElement)("div",{...t},(0,element_1.createElement)("h4",null," ",r," "),(0,element_1.createElement)(components_1.CheckboxControl,{label:c?(0,element_1.createInterpolateElement)("<label /> <tooltip />",{label:(0,element_1.createElement)("span",null,l),tooltip:(0,element_1.createElement)(components_1.Tooltip,{text:(0,element_1.createElement)("span",null,c),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:20,fill:"#949494"})))}):l,checked:n,onChange:e=>s(e)}))}exports.Edit=Edit;