import { TextField } from "@repo/rdx-ui/components";
import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@repo/shadcn-ui/components";
import { useTranslation } from "../../i18n";

export function CustomerContactFields({ control }: { control: any }) {
  const { t } = useTranslation();

  return (
    <Card className='shadow-none'>
      <CardHeader>
        <CardTitle>{t("form_groups.contact_info.title")}</CardTitle>
        <CardDescription>{t("form_groups.contact_info.description")}</CardDescription>
      </CardHeader>
      <CardContent className='grid grid-cols-1 gap-y-8 gap-x-6 @xl:grid-cols-2'>
        <TextField
          control={control}
          name='email_primary'
          label={t("form_fields.email_primary.label")}
          placeholder={t("form_fields.email_primary.placeholder")}
          description={t("form_fields.email_primary.description")}
        />
        <TextField
          control={control}
          name='email_secondary'
          label={t("form_fields.email_secondary.label")}
          placeholder={t("form_fields.email_secondary.placeholder")}
          description={t("form_fields.email_secondary.description")}
        />
        <TextField
          control={control}
          name='phone_primary'
          label={t("form_fields.phone_primary.label")}
          placeholder={t("form_fields.phone_primary.placeholder")}
          description={t("form_fields.phone_primary.description")}
        />
        <TextField
          control={control}
          name='phone_secondary'
          label={t("form_fields.phone_secondary.label")}
          placeholder={t("form_fields.phone_secondary.placeholder")}
          description={t("form_fields.phone_secondary.description")}
        />
        <TextField
          control={control}
          name='mobile_primary'
          label={t("form_fields.mobile_primary.label")}
          placeholder={t("form_fields.mobile_primary.placeholder")}
          description={t("form_fields.mobile_primary.description")}
        />
        <TextField
          control={control}
          name='mobile_secondary'
          label={t("form_fields.mobile_secondary.label")}
          placeholder={t("form_fields.mobile_secondary.placeholder")}
          description={t("form_fields.mobile_secondary.description")}
        />
        <TextField
          control={control}
          name='fax'
          label={t("form_fields.fax.label")}
          placeholder={t("form_fields.fax.placeholder")}
          description={t("form_fields.fax.description")}
        />
        <TextField
          className='xl:col-span-2'
          control={control}
          name='website'
          label={t("form_fields.website.label")}
          placeholder={t("form_fields.website.placeholder")}
          description={t("form_fields.website.description")}
        />
      </CardContent>
    </Card>
  );
}
