"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var o in t)__defProp(e,o,{get:t[o],enumerable:!0})},__copyProps=(e,t,o,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of __getOwnPropNames(t))__hasOwnProp.call(e,i)||i===o||__defProp(e,i,{get:()=>t[i],enumerable:!(r=__getOwnPropDesc(t,i))||r.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),edit_exports={};__export(edit_exports,{Edit:()=>Edit}),module.exports=__toCommonJS(edit_exports);var import_element=require("@wordpress/element"),import_components=require("@wordpress/components"),import_block_templates=require("@woocommerce/block-templates"),import_navigation=require("@woocommerce/navigation"),import_core_data=require("@wordpress/core-data"),import_notice=require("../../../components/notice"),import_utils=require("../../../utils");function Edit({attributes:e}){const t=(0,import_block_templates.useWooBlockProps)(e),{buttonText:o,content:r,title:i,type:p="info"}=e,[n]=(0,import_core_data.useEntityProp)("postType","product","attributes"),[_]=(0,import_core_data.useEntityProp)("postType","product","type"),a=(0,import_utils.hasAttributesUsedForVariations)(n)&&"variable"===_;return(0,import_element.createElement)("div",{...t},a&&(0,import_element.createElement)(import_notice.Notice,{content:r,title:i,type:p},(0,import_element.createElement)(import_components.Button,{isSecondary:!0,onClick:()=>(0,import_navigation.navigateTo)({url:(0,import_navigation.getNewPath)({tab:"variations"})})},o)))}