"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(e,o)=>{for(var t in o)__defProp(e,t,{get:o[t],enumerable:!0})},__copyProps=(e,o,t,r)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let p of __getOwnPropNames(o))__hasOwnProp.call(e,p)||p===t||__defProp(e,p,{get:()=>o[p],enumerable:!(r=__getOwnPropDesc(o,p))||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_i18n=require("@wordpress/i18n"),import_compose=require("@wordpress/compose"),import_element=require("@wordpress/element"),import_block_templates=require("@woocommerce/block-templates"),import_components=require("@wordpress/components"),import_core_data=require("@wordpress/core-data"),import_validation_context=require("../../../contexts/validation-context");function Edit({attributes:e,context:o}){const t=(0,import_block_templates.useWooBlockProps)(e),[r,p]=(0,import_core_data.useEntityProp)("postType",o.postType,"sku"),{ref:n}=(0,import_validation_context.useValidation)("sku",async function(){},[r]),_=(0,import_compose.useInstanceId)(import_components.BaseControl,"product_sku");return(0,import_element.createElement)("div",{...t},(0,import_element.createElement)(import_components.BaseControl,{id:_,className:"woocommerce-product-form_inventory-sku",label:(0,import_element.createInterpolateElement)((0,import_i18n.__)("Sku <description />","woocommerce"),{description:(0,import_element.createElement)("span",{className:"woocommerce-product-form__optional-input"},(0,import_i18n.__)("(STOCK KEEPING UNIT)","woocommerce"))})},(0,import_element.createElement)(import_components.__experimentalInputControl,{ref:n,id:_,name:"woocommerce-product-sku",onChange:e=>{p(e??"")},value:r||"",disabled:e.disabled})))}