"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Edit=void 0;const element_1=require("@wordpress/element"),block_editor_1=require("@wordpress/block-editor"),data_1=require("@wordpress/data"),components_1=require("@woocommerce/components"),core_data_1=require("@wordpress/core-data");function Edit({attributes:e}){const t=(0,block_editor_1.useBlockProps)(),{mustMatch:r}=e,o=(0,core_data_1.useEntityId)("postType","product"),s=(0,data_1.useSelect)((e=>e("core").getEditedEntityRecord("postType","product",o))),c=(0,element_1.useMemo)((()=>{for(const[e,t]of Object.entries(r))if(!t.includes(s[e]))return!1;return!0}),[r,s]);return(0,element_1.createElement)("div",{...t},(0,element_1.createElement)(components_1.DisplayState,{state:c?"visible":"visually-hidden"},(0,element_1.createElement)(block_editor_1.InnerBlocks,{templateLock:"all"})))}exports.Edit=Edit;