"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"),core_data_1=require("@wordpress/core-data"),details_categories_field_1=require("../../components/details-categories-field");function Edit({attributes:e,context:r}){const t=(0,block_editor_1.useBlockProps)(),{name:o,label:i,placeholder:s}=e,[c,l]=(0,core_data_1.useEntityProp)("postType",(null==r?void 0:r.postType)||"product",o||"categories");return(0,element_1.createElement)("div",{...t},(0,element_1.createElement)(details_categories_field_1.CategoryField,{label:i||(0,i18n_1.__)("Categories","woocommerce"),placeholder:s||(0,i18n_1.__)("Search or create category…","woocommerce"),onChange:l,value:c||[]}))}exports.Edit=Edit;