"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"),block_templates_1=require("@woocommerce/block-templates"),tab_button_1=require("./tab-button");function Edit({setAttributes:e,attributes:t,context:o}){const r=(0,block_templates_1.useWooBlockProps)(t),{id:l,title:c,_templateBlockOrder:s,isSelected:a}=t,n=o.selectedTab===l;n!==a&&e({isSelected:n});const _=(0,classnames_1.default)("wp-block-woocommerce-product-tab__content",{"is-selected":n});return(0,element_1.createElement)("div",{...r},(0,element_1.createElement)(tab_button_1.TabButton,{id:l,selected:n,order:s},c),(0,element_1.createElement)("div",{id:`woocommerce-product-tab__${l}-content`,"aria-labelledby":`woocommerce-product-tab__${l}`,role:"tabpanel",className:_},(0,element_1.createElement)(block_editor_1.InnerBlocks,{templateLock:"contentOnly"})))}exports.Edit=Edit;