import{t as e}from"./vendor-react-CnQ8cts2.js";import{j as t}from"./BrandWordmark-Yl88w34l.js";import{It as n}from"./index-DqTzlbka.js";var r=e(),i=[{key:`energyKcal`,labelKey:`nutrition.energyKcal`},{key:`fat`,labelKey:`nutrition.fat`},{key:`carbs`,labelKey:`nutrition.carbs`},{key:`protein`,labelKey:`nutrition.protein`},{key:`fiber`,labelKey:`nutrition.fiber`},{key:`sugar`,labelKey:`nutrition.sugar`},{key:`salt`,labelKey:`nutrition.salt`}],a=[{key:`vitaminA`,labelKey:`nutrition.vitaminA`},{key:`vitaminC`,labelKey:`nutrition.vitaminC`},{key:`vitaminD`,labelKey:`nutrition.vitaminD`},{key:`vitaminE`,labelKey:`nutrition.vitaminE`},{key:`vitaminB1`,labelKey:`nutrition.vitaminB1`},{key:`vitaminB2`,labelKey:`nutrition.vitaminB2`},{key:`vitaminB6`,labelKey:`nutrition.vitaminB6`},{key:`vitaminB12`,labelKey:`nutrition.vitaminB12`}],o=[{key:`calcium`,labelKey:`nutrition.calcium`},{key:`iron`,labelKey:`nutrition.iron`},{key:`magnesium`,labelKey:`nutrition.magnesium`},{key:`potassium`,labelKey:`nutrition.potassium`},{key:`zinc`,labelKey:`nutrition.zinc`}];function s({value:e,onChange:s}){let{t:c}=t();function l(t,r){s({...e,[t]:n(r)})}function u(t,n){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`p`,{className:`nutrition-fields-group-title`,children:c(t)}),(0,r.jsx)(`div`,{className:`nutrition-fields-grid`,children:n.map(({key:t,labelKey:n})=>(0,r.jsxs)(`label`,{children:[c(n),(0,r.jsx)(`input`,{type:`number`,min:0,step:`any`,value:e[t]??``,onChange:e=>l(t,e.target.value)})]},t))})]})}return(0,r.jsxs)(`div`,{className:`nutrition-fields`,children:[(0,r.jsx)(`p`,{className:`nutrition-fields-hint`,children:c(`nutrition.per100gHint`)}),u(`nutrition.macros`,i),u(`nutrition.vitamins`,a),u(`nutrition.minerals`,o)]})}export{s as t};