"use strict";(globalThis.webpackChunkacadlix=globalThis.webpackChunkacadlix||[]).push([["admin_quiz_free_range_type"],{"./src/free/admin/question/types/RangeType.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"),s=t("./node_modules/@mui/material/esm/CardContent/CardContent.js"),i=t("./node_modules/@mui/material/esm/Grid/Grid.js"),l=t("./src/components/CustomTextField.js"),u=t("@wordpress/i18n"),d=t("react/jsx-runtime");const o=function(e){return(0,d.jsxs)(n.A,{children:[(0,d.jsx)(r.A,{title:e?.watch("multi_language")?(0,u.__)("Range Type","acadlix")+` (${e?.lang?.language_name})`:(0,u.__)("Range Type","acadlix"),titleTypographyProps:{variant:"h6"}}),(0,d.jsx)(s.A,{sx:{paddingTop:1},children:(0,d.jsxs)(i.A,{container:!0,spacing:4,children:[(0,d.jsx)(i.A,{size:{xs:12,lg:6},children:(0,d.jsx)(l.A,{...e?.register(`language.${e?.index}.answer_data.${e?.type}.from`,{valueAsNumber:!0,required:{value:e?.watch(`language.${e?.index}.default`),message:(0,u.__)("Required","acadlix")}}),fullWidth:!0,size:"small",label:(0,u.__)("Range From","acadlix"),type:"number",inputProps:{step:1e-5},value:e?.lang?.answer_data?.[e?.type]?.from,onChange:a=>{e?.watch("language")?.forEach((t,n)=>{e?.setValue(`language.${n}.answer_data.${e?.type}.from`,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]?.from),helperText:e.formState.errors?.language?.[e?.index]?.answer_data?.[e?.type]?.from?.message})}),(0,d.jsx)(i.A,{size:{xs:12,lg:6},children:(0,d.jsx)(l.A,{...e?.register(`language.${e?.index}.answer_data.${e?.type}.to`,{valueAsNumber:!0,required:{value:e?.watch(`language.${e?.index}.default`),message:(0,u.__)("Required","acadlix")},validate:a=>a>e?.watch(`language.${e?.index}.answer_data.${e?.type}.from`)||(0,u.__)("Must be greater than from","acadlix")}),fullWidth:!0,size:"small",label:(0,u.__)("Range To","acadlix"),type:"number",inputProps:{step:1e-5},value:e?.lang?.answer_data?.[e?.type]?.to,onChange:a=>{e?.watch("language")?.forEach((t,n)=>{e?.setValue(`language.${n}.answer_data.${e?.type}.to`,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]?.to),helperText:e.formState.errors?.language?.[e?.index]?.answer_data?.[e?.type]?.to?.message})})]})})]})}}}]);