import{u as t,j as o}from"./fields-wnm5Jtc6.js";import{u as x,a as i}from"./vendor-D21mNUGX.js";import{u as j,a as y,m as C,co as b,L as c,s as l,p as h}from"./index-pmrLY__j.js";import{B as m}from"./index-CRkUIX16.js";import{L as w}from"./Layout-CFk9FOHT.js";import{C as s}from"./CardRow-Bf5pkBel.js";import{C as R}from"./index-5Ilcd7WA.js";import{B as W}from"./index-z-Hpcrdu.js";import{W as I}from"./index-DSQF88hb.js";import{w as P}from"./woocommerce_icons-D18HYm26.js";const N=({})=>{const d=j(),{data:a,loading:n}=y(r=>r.fetchWooCommerceProductData),{id:e}=x(),[u,p]=i.useState(!1);if(i.useEffect(()=>{C(t("View WooCommerce product data")),d(b({id:e})).then(r=>p(!0))},[e]),n)return o.jsx(c,{});if(!u)return o.jsx(c,{});const f=[o.jsx(m,{style:l.SECONDARY,to:`/product-data/product/edit/${e}`,children:t("Edit")}),o.jsx(m,{style:l.PRIMARY,to:`/product-data/product/fields/${e}`,children:t("Manage fields")})];return o.jsx(w,{crumbs:[{label:t("Registered Custom Post Types"),link:"/"},{label:t("WooCommerce product data"),link:"/product-data/product"},{label:t("View WooCommerce product data")}],actions:f,title:t("View WooCommerce product data"),children:o.jsxs(R,{style:"with-shadow",children:[o.jsx(s,{label:t("Name"),value:a.name}),o.jsx(s,{label:t("Icon"),value:o.jsx("span",{className:`wcicon-${typeof a.icon=="object"?a.icon.icon:P[a.icon]}`,style:{color:h(),fontSize:"18px"}})}),o.jsx(s,{label:t("Show on UI"),value:o.jsx(W,{status:a.showInUI})}),o.jsx(s,{label:t("Visibility"),value:o.jsx(I,{visibility:a.visibility})})]})})};export{N as default};
