import { useCategory } from "@/lib/contexts/category";
import CallActionSubcategoriesButton from "./CallActionSubcategoriesButton";
import { Chip, Divider, Grid, Stack } from "@mui/material";

const CallActionsSubcategories = ({ control, onSubmit }) => {
  const { subCategoryLists } = useCategory();
  return (
    <>
      <Divider sx={{ margin: 2 }}>
        <Chip label={"زیر موضوع ها"} variant="outlined" />
      </Divider>
      <Stack sx={{ m: 1, p: 1 }} direction={"row"} spacing={3}>
        {subCategoryLists.map((sub_category, index) => {
          return (
            <CallActionSubcategoriesButton
              key={index}
              sub_category={sub_category}
              control={control}
              onSubmit={onSubmit}
            />
          );
        })}
      </Stack>
    </>
  );
};
export default CallActionsSubcategories;
