"use client";
import React, { useState, useRef, useEffect } from "react";
import { Modal } from "@/components/ui/modal";
import Label from '@/components/form/Label';
import Input from '@/components/form/input/InputField2';


interface AddModifyGroupModalProps {
  isOpen: boolean;
  openModal: () => void;
  closeModal: () => void;
}

export default function AddModifyGroupModal({ isOpen, openModal, closeModal }: AddModifyGroupModalProps) {
  const [eventTitle, setEventTitle] = useState("");
  const [eventStartDate, setEventStartDate] = useState("");
  const [eventEndDate, setEventEndDate] = useState("");


  const handleClickAddOrModify = () => {
  }


  return (
    <div className="rounded-2xl border  border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]">
      <Modal
        isOpen={isOpen}
        onClose={closeModal}
        className="max-w-[700px] p-6 lg:p-10"
      >
        <div className="flex flex-col px-2 overflow-y-auto custom-scrollbar">
          <div>
            <h5 className="mb-2 font-semibold text-gray-800 modal-title text-theme-xl dark:text-white/90 lg:text-2xl">
              사업자 등록
            </h5>
            <p className="text-sm text-gray-500 dark:text-gray-400">
              신규 사업자원장 정보 등록
            </p>
          </div>

          <div className="mt-8"></div>
          <div className="space-y-6">
            <div>
              <Label>그룹명(사업자명)</Label>
              <Input type="text" />
            </div>
            <div>
              <Label>사업자번호</Label>
              <Input type="text" />
            </div>
            <div>
              <Label>전화번호</Label>
              <Input type="text" />
            </div>
            <div>
              <Label>이메일</Label>
              <Input type="text" />
            </div>
            <div>
              <Label>대표자명</Label>
              <Input type="text" />
            </div>
          </div>
          <div className="flex items-center gap-3 mt-6 modal-footer sm:justify-end">
            <button
              onClick={closeModal}
              type="button"
              className="flex w-full justify-center rounded-lg border border-gray-300 bg-white px-4 py-2.5 text-sm font-medium text-gray-700 hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-white/[0.03] sm:w-auto"
            >
              닫기
            </button>
            <button
              onClick={handleClickAddOrModify}
              type="button"
              className="btn btn-success btn-update-event flex w-full justify-center rounded-lg bg-brand-500 px-4 py-2.5 text-sm font-medium text-white hover:bg-brand-600 sm:w-auto"
            >
              추가
            </button>
          </div>
        </div>
      </Modal>
    </div>
  );
};
