import{r as e,t}from"./jsx-runtime-BbTa8W_M-1776590214964.js";import{t as n}from"./useTranslation-D1etqd9u-1776590214964.js";import{a as r,i,n as a,r as o,t as s}from"./select-CdmWSLLH-1776590214964.js";import{t as c}from"./circle-question-mark-DOaYfAof-1776590214964.js";import{t as l}from"./label-DwYxovYB-1776590214964.js";import{i as u,n as d,r as f,t as p}from"./tooltip-DTL_sKN1-1776590214964.js";import{a as m,n as h,o as g,r as _,t as v}from"./card-Cby8flFO-1776590214964.js";import{t as y}from"./input-BlYvaS0F-1776590214964.js";e();var b=t(),x=({data:e,setData:t,currencies:x,errors:S})=>{let{t:C}=n(),w=x?.find(t=>t.code===e.currency_code)||{symbol:`$`};return(0,b.jsxs)(v,{className:`shadow-sm`,children:[(0,b.jsxs)(m,{children:[(0,b.jsx)(g,{children:C(`Pricing & Inventory`)}),(0,b.jsx)(_,{children:C(`Set base prices and wholesale limits.`)})]}),(0,b.jsx)(h,{className:`space-y-4`,children:(0,b.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-4 gap-4`,children:[(0,b.jsxs)(`div`,{className:`space-y-2`,children:[(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(l,{children:[C(`Currency`),` `,(0,b.jsx)(`span`,{className:`text-destructive`,children:`*`})]}),(0,b.jsx)(f,{children:(0,b.jsxs)(p,{children:[(0,b.jsx)(u,{asChild:!0,children:(0,b.jsx)(c,{className:`w-4 h-4 text-muted-foreground cursor-help`})}),(0,b.jsx)(d,{children:(0,b.jsx)(`p`,{className:`max-w-xs text-xs`,children:C(`Price will be securely converted to the system's base currency for global marketplace consistency, but tracked in your selected currency here.`)})})]})})]}),(0,b.jsxs)(s,{value:e.currency_code,onValueChange:e=>t(`currency_code`,e),children:[(0,b.jsx)(i,{className:S?.currency_code?`border-destructive`:``,children:(0,b.jsx)(r,{placeholder:C(`Currency`)})}),(0,b.jsx)(a,{children:x?.map(e=>(0,b.jsxs)(o,{value:e.code,children:[e.code,` (`,e.symbol,`)`]},e.code))})]}),S?.currency_code&&(0,b.jsx)(`p`,{className:`text-xs text-destructive`,children:S.currency_code})]}),(0,b.jsxs)(`div`,{className:`space-y-2`,children:[(0,b.jsxs)(l,{children:[C(`Unit Price`),` (`,w.symbol,`) `,(0,b.jsx)(`span`,{className:`text-destructive`,children:`*`})]}),(0,b.jsx)(y,{type:`number`,min:`0`,step:`0.01`,placeholder:`0.00`,value:e.price,onChange:e=>t(`price`,e.target.value),className:S?.price?`border-destructive`:``}),S?.price&&(0,b.jsx)(`p`,{className:`text-xs text-destructive`,children:S.price})]}),(0,b.jsxs)(`div`,{className:`space-y-2`,children:[(0,b.jsxs)(l,{children:[C(`Stock Quantity`),` `,(0,b.jsx)(`span`,{className:`text-destructive`,children:`*`})]}),(0,b.jsx)(y,{type:`number`,min:`0`,placeholder:`1000`,value:e.stock,onChange:e=>t(`stock`,e.target.value),className:S?.stock?`border-destructive`:``}),S?.stock&&(0,b.jsx)(`p`,{className:`text-xs text-destructive`,children:S.stock})]}),(0,b.jsxs)(`div`,{className:`space-y-2`,children:[(0,b.jsxs)(l,{children:[C(`Minimum Order (MOQ)`),` `,(0,b.jsx)(`span`,{className:`text-destructive`,children:`*`})]}),(0,b.jsx)(y,{type:`number`,min:`1`,placeholder:`1`,value:e.moq,onChange:e=>t(`moq`,e.target.value),className:S?.moq?`border-destructive`:``}),S?.moq&&(0,b.jsx)(`p`,{className:`text-xs text-destructive`,children:S.moq})]})]})})]})};export{x as t};