"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Edit=void 0;const element_1=require("@wordpress/element"),components_1=require("@wordpress/components"),block_templates_1=require("@woocommerce/block-templates"),navigation_1=require("@woocommerce/navigation"),core_data_1=require("@wordpress/core-data"),notice_1=require("../../../components/notice"),utils_1=require("../../../utils");function Edit({attributes:e}){const t=(0,block_templates_1.useWooBlockProps)(e),{buttonText:o,content:r,title:i,type:n="info"}=e,[s]=(0,core_data_1.useEntityProp)("postType","product","attributes"),[a]=(0,core_data_1.useEntityProp)("postType","product","type"),c=(0,utils_1.hasAttributesUsedForVariations)(s)&&"variable"===a;return(0,element_1.createElement)("div",{...t},c&&(0,element_1.createElement)(notice_1.Notice,{content:r,title:i,type:n},(0,element_1.createElement)(components_1.Button,{isSecondary:!0,onClick:()=>(0,navigation_1.navigateTo)({url:(0,navigation_1.getNewPath)({tab:"variations"})})},o)))}exports.Edit=Edit;