import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect";
import EditField from "../../../app/component/EditField";
import Content from "./Content";

const bime = [
  { label: "بیمه 1", id: 10 },
  { label: "بیمه 2", id: 20 },
  { label: "بیمه 3", id: 30 },
];

function Form({ changeData, data, updateSelect, isForAnother }) {
  return (
    <div
      className="grid mt-[12px] sm:mt-[14px] md:mt-[17px] lg:mt-[20px] items-start 
        justify-center gap-x-[24px] gap-y-[12px] md:gap-y-[14px] lg:gap-y-[16px] grid-cols-1 sm:grid-cols-2"
    >
      <Content title="شماره موبایل" isConfirmed={isForAnother ? false : true}>
        <EditField changeData={changeData} data={data?.phone} name="phone" />
      </Content>
      <Content title="کد ملی">
        <EditField
          changeData={changeData}
          data={data?.codemeli}
          name="codemeli"
        />
      </Content>
      <Content title="نام و نام خانوادگی">
        <EditField changeData={changeData} data={data?.name} name="name" />
      </Content>
      <Content title="نوع بیمه">
        <AutoCompleteSelect
          updateData={updateSelect}
          label="نوع بیمه"
          name="first"
          list={bime}
        />
      </Content>
    </div>
  );
}

export default Form;
