"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Edit=void 0;const i18n_1=require("@wordpress/i18n"),element_1=require("@wordpress/element"),block_editor_1=require("@wordpress/block-editor"),components_1=require("@wordpress/components"),compose_1=require("@wordpress/compose"),core_data_1=require("@wordpress/core-data"),tags_field_1=require("../../components/tags-field");function Edit({attributes:e,context:o}){const r=(0,block_editor_1.useBlockProps)(),{name:t,label:s,placeholder:n}=e,[c,i]=(0,core_data_1.useEntityProp)("postType",(null==o?void 0:o.postType)||"product",t||"tags"),d=(0,compose_1.useInstanceId)(components_1.BaseControl,"tag-field");return(0,element_1.createElement)("div",{...r},(0,element_1.createElement)(tags_field_1.TagField,{id:d,label:s||(0,i18n_1.__)("Tags","woocommerce"),placeholder:n||(0,i18n_1.__)("Search or create tags…","woocommerce"),onChange:i,value:c||[]}))}exports.Edit=Edit;