"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,o)=>{for(var t in o)__defProp(e,t,{get:o[t],enumerable:!0})},__copyProps=(e,o,t,r)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let p of __getOwnPropNames(o))__hasOwnProp.call(e,p)||p===t||__defProp(e,p,{get:()=>o[p],enumerable:!(r=__getOwnPropDesc(o,p))||r.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),edit_exports={};__export(edit_exports,{Edit:()=>Edit}),module.exports=__toCommonJS(edit_exports);var import_i18n=require("@wordpress/i18n"),import_block_templates=require("@woocommerce/block-templates"),import_element=require("@wordpress/element"),import_components=require("@wordpress/components"),import_compose=require("@wordpress/compose"),import_core_data=require("@wordpress/core-data"),import_tags_field=require("../../../components/tags-field");function Edit({attributes:e,context:{postType:o,isInSelectedTab:t}}){const r=(0,import_block_templates.useWooBlockProps)(e),{name:p,label:_,placeholder:s}=e,[i,m]=(0,import_core_data.useEntityProp)("postType",o||"product",p||"tags"),n=(0,import_compose.useInstanceId)(import_components.BaseControl,"tag-field");return(0,import_element.createElement)("div",{...r},(0,import_element.createElement)(import_tags_field.TagField,{id:n,isVisible:t,label:_||(0,import_i18n.__)("Tags","woocommerce"),placeholder:s||(0,import_i18n.__)("Search or create tags…","woocommerce"),onChange:m,value:i||[]}))}