"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Edit=Edit;const block_templates_1=require("@woocommerce/block-templates"),components_1=require("@wordpress/components"),element_1=require("@wordpress/element"),sanitize_1=require("@woocommerce/sanitize"),use_product_entity_prop_1=__importDefault(require("../../../hooks/use-product-entity-prop")),label_1=require("../../../components/label/label");function Edit({attributes:e,context:{postType:t}}){const o=(0,block_templates_1.useWooBlockProps)(e),{property:l,label:r,note:n,help:i,tooltip:s,disabled:p,options:a,multiple:_}=e,[u,c]=(0,use_product_entity_prop_1.default)(l,{postType:t,fallbackValue:""});return Array.isArray(u),(0,element_1.createElement)("div",{...o},(0,element_1.createElement)(components_1.SelectControl,{value:u,disabled:p,label:(0,element_1.createElement)(label_1.Label,{label:r,note:n,tooltip:s}),onChange:c,help:function(){if(i)return(0,element_1.createElement)("span",{dangerouslySetInnerHTML:{__html:(0,sanitize_1.sanitizeHTML)(i)}})}(),options:a,multiple:_}))}