"use strict";var __create=Object.create,__defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__getProtoOf=Object.getPrototypeOf,__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},__toESM=(e,o,t)=>(t=null!=e?__create(__getProtoOf(e)):{},__copyProps(!o&&e&&e.__esModule?t:__defProp(t,"default",{value:e,enumerable:!0}),e)),__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),edit_exports={};__export(edit_exports,{Edit:()=>Edit}),module.exports=__toCommonJS(edit_exports);var import_block_templates=require("@woocommerce/block-templates"),import_components=require("@woocommerce/components"),import_navigation=require("@woocommerce/navigation"),import_tracks=require("@woocommerce/tracks"),import_compose=require("@wordpress/compose"),import_element=require("@wordpress/element"),import_i18n=require("@wordpress/i18n"),import_components2=require("@wordpress/components"),import_use_currency_input_props=require("../../../hooks/use-currency-input-props"),import_use_product_entity_prop=__toESM(require("../../../hooks/use-product-entity-prop")),import_label=require("../../../components/label/label");function Edit({attributes:e,context:{postType:o}}){const t=(0,import_block_templates.useWooBlockProps)(e),{property:r,label:p=(0,import_i18n.__)("Price","woocommerce"),help:_,disabled:n,tooltip:i}=e,[m,c]=(0,import_use_product_entity_prop.default)(r,{postType:o,fallbackValue:""}),l=(0,import_use_currency_input_props.useCurrencyInputProps)({value:m||"",onChange:c}),s=_?(0,import_element.createInterpolateElement)(_,{PricingTab:(0,import_element.createElement)(import_components.Link,{href:(0,import_navigation.getNewPath)({tab:"pricing"}),onClick:()=>{(0,import_tracks.recordEvent)("product_pricing_help_click")}})}):null,a=(0,import_compose.useInstanceId)(import_components2.BaseControl,"wp-block-woocommerce-product-pricing-field");return(0,import_element.createElement)("div",{...t},(0,import_element.createElement)(import_components2.BaseControl,{id:a,help:s},(0,import_element.createElement)(import_components2.__experimentalInputControl,{...l,disabled:n,id:a,name:r,label:i?(0,import_element.createElement)(import_label.Label,{label:p,tooltip:i}):p})))}