File "edit.js"

Full Path: /home/jlklyejr/public_html/wp-content/test/wp-content/plugins/woocommerce/assets/client/admin/product-editor/blocks/generic/radio/edit.js
File size: 851 bytes
MIME-type: text/plain
Charset: utf-8

"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 element_1=require("@wordpress/element"),block_templates_1=require("@woocommerce/block-templates"),radio_field_1=require("../../../components/radio-field"),use_product_entity_prop_1=__importDefault(require("../../../hooks/use-product-entity-prop"));function Edit({attributes:e,context:{postType:t}}){const o=(0,block_templates_1.useWooBlockProps)(e),{description:r,options:i,property:p,title:l}=e,[s,_]=(0,use_product_entity_prop_1.default)(p,{postType:t,fallbackValue:""});return(0,element_1.createElement)("div",{...o},(0,element_1.createElement)(radio_field_1.RadioField,{title:l,description:r,selected:s,options:i,onChange:e=>_(e||"")}))}exports.Edit=Edit;