import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect"; import RadioContent from "./RadioContent"; import { FormControlLabel, Switch } from "@mui/material"; import specialties from "@/data/specialties.json"; import { addKeyToList } from "@/helper"; const group1 = ["خانم", "آقا", "هر دو"]; const group2 = ["فوق تخصص", "دکترای تخصصی", "متخصص", "دکتری"]; function Content({ data, setData }) { const parentList = specialties.filter(item => !item.parent); const childrenList = specialties.filter(item => item.parent); const changedParentList = addKeyToList(parentList, 'label', 'name') || []; const changedChildrenList = addKeyToList(childrenList, 'label', 'name') || []; const filteredChildrenList = changedChildrenList.filter(item => item.parent === data.category.id); console.log(data); const changeData = (value, name) => { console.log(value); console.log(name); setData({ ...data, [name]: value }) }; return (
{/*

فقط پزشکان دارای نوبت

*/} {/* changeData(event.target.checked, "turn") } /> */} changeData(event.target.checked, "turn")} /> } sx={{ ".MuiFormControlLabel-label": { color: "#3B3B3B", fontSize: "16px", fontWeight: 500, }, ".MuiFormControlLabel-root.MuiFormControlLabel-labelPlacementStart": { marginRight: '0 !important' } }} label="فقط پزشکان دارای نوبت" labelPlacement="start" // متن را سمت راست یا چپ قرار می‌دهد />
); } export default Content;