"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Edit=void 0;const block_editor_1=require("@wordpress/block-editor"),classnames_1=__importDefault(require("classnames")),element_1=require("@wordpress/element"),tab_button_1=require("./tab-button");function Edit({setAttributes:e,attributes:t,context:o}){const r=(0,block_editor_1.useBlockProps)(),{id:l,title:c,order:n,isSelected:s}=t,i=(null==o?void 0:o.selectedTab)===l;i!==s&&e({isSelected:i});const a=(0,classnames_1.default)("wp-block-woocommerce-product-tab__content",{"is-selected":i});return(0,element_1.createElement)("div",{...r},(0,element_1.createElement)(tab_button_1.TabButton,{id:l,selected:i,order:n},c),(0,element_1.createElement)("div",{id:`woocommerce-product-tab__${l}-content`,"aria-labelledby":`woocommerce-product-tab__${l}`,role:"tabpanel",className:a},(0,element_1.createElement)(block_editor_1.InnerBlocks,{templateLock:"contentOnly"})))}exports.Edit=Edit;