"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var o in t)__defProp(e,o,{get:t[o],enumerable:!0})},__copyProps=(e,t,o,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let p of __getOwnPropNames(t))__hasOwnProp.call(e,p)||p===o||__defProp(e,p,{get:()=>t[p],enumerable:!(r=__getOwnPropDesc(t,p))||r.enumerable});return e},__toESM=(e,t,o)=>(o=null!=e?__create(__getProtoOf(e)):{},__copyProps(!t&&e&&e.__esModule?o:__defProp(o,"default",{value:e,enumerable:!0}),e)),__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),edit_exports={};__export(edit_exports,{Edit:()=>Edit}),module.exports=__toCommonJS(edit_exports);var import_block_templates=require("@woocommerce/block-templates"),import_components=require("@wordpress/components"),import_element=require("@wordpress/element"),import_sanitize=require("@woocommerce/sanitize"),import_use_product_entity_prop=__toESM(require("../../../hooks/use-product-entity-prop")),import_label=require("../../../components/label/label");function Edit({attributes:e,context:{postType:t}}){const o=(0,import_block_templates.useWooBlockProps)(e),{property:r,label:p,note:_,help:l,tooltip:n,disabled:i,options:a,multiple:s}=e,[m,c]=(0,import_use_product_entity_prop.default)(r,{postType:t,fallbackValue:""});return Array.isArray(m),(0,import_element.createElement)("div",{...o},(0,import_element.createElement)(import_components.SelectControl,{value:m,disabled:i,label:(0,import_element.createElement)(import_label.Label,{label:p,note:_,tooltip:n}),onChange:c,help:function(){if(l)return(0,import_element.createElement)("span",{dangerouslySetInnerHTML:{__html:(0,import_sanitize.sanitizeHTML)(l)}})}(),options:a,multiple:s}))}