"use strict";(globalThis.webpackChunkacadlix=globalThis.webpackChunkacadlix||[]).push([["admin_quiz_free_numerical"],{"./src/free/admin/question/types/Numerical.js":(e,a,t)=>{t.r(a),t.d(a,{default:()=>o}),t("react");var n=t("./node_modules/@mui/material/esm/Card/Card.js"),r=t("./node_modules/@mui/material/esm/CardHeader/CardHeader.js"),i=t("./node_modules/@mui/material/esm/CardContent/CardContent.js"),s=t("./src/components/CustomTextField.js"),l=t("@wordpress/i18n"),u=t("react/jsx-runtime");const o=function(e){return(0,u.jsxs)(n.A,{children:[(0,u.jsx)(r.A,{title:e?.watch("multi_language")?(0,l.__)("Numerical","acadlix")+` (${e?.lang?.language_name})`:(0,l.__)("Numerical","acadlix"),titleTypographyProps:{variant:"h6"}}),(0,u.jsx)(i.A,{sx:{paddingTop:1},children:(0,u.jsx)(s.A,{...e?.register(`language.${e?.index}.answer_data.${e?.type}.option`,{valueAsNumber:!0,required:{value:e?.watch(`language.${e?.index}.default`),message:"Required"}}),size:"small",type:"number",label:(0,l.__)("Enter number","acadlix"),inputProps:{step:1e-6},value:e?.lang?.answer_data?.[e?.type]?.option,onChange:a=>{e?.watch("language")?.forEach((t,n)=>{e?.setValue(`language.${n}.answer_data.${e?.type}.option`,a?.target?.value,{shouldDirty:!0})})},sx:{"& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button":{display:"none"},"& input[type=number]":{MozAppearance:"textfield"}},error:Boolean(e.formState?.errors?.language?.[e?.index]?.answer_data?.[e?.type]?.option),helperText:e.formState.errors?.language?.[e?.index]?.answer_data?.[e?.type]?.option?.message})})]})}}}]);