import React from "react";
import Button from "../../component/Button.jsx";
import Table from "../../component/Table.jsx";
import Modal from "../../component/Modal.jsx";
import { useNavigate } from "react-router";
import ContentTitle from "../../component/ContentTitle.jsx";

export default function EquipmentManagementSelectAdd() {
  const [modalOpen, setModalOpen] = React.useState(false);
  const openModal = () => {
    setModalOpen(true);
  };
  const closeModal = () => {
    setModalOpen(false);
  };
  const navigate = useNavigate();
  //게시판
  const thead = [
    "No",
    "기관명",
    "요청일자",
    "요청수량",
    "사용자(사용등록번호)",
    "처리여부",
  ];
  const key = [
    "No",
    "name",
    "date",
    "period_of_use",
    "address",
    "visit",
  ];
  const content = [
    {
      No: 1,
      name: "A복지관",
      date: "2023-01-27",
      period_of_use: "2대",
      address: "김복남(2022020901) / 김삼남(2022020801)",
      visit:(
        <div className="btn-wrap">
              <Button
                className={"btn-small green-btn"}
                btnName={"승인"}
              />
            </div>
      ),
    },
    {
      No: 2,
      name: "B복지관",
      date: "2023-01-27",
      period_of_use: "1대",
      address: "김사남(2023020102)",
      visit:(
        <div className="btn-wrap">
              <Button
                className={"btn-small green-btn"}
                btnName={"승인"}
              />
            </div>
      ),
    },
  ];
  return (
    <main>
      
      <div className="content-wrap">
      <ContentTitle contentTitle={"장비 추가 요청"} />
         <div className="board-wrap">
        {/*<div className="btn-wrap flex-end margin-bottom">
              <Button
                className={"btn-small green-btn"}
                btnName={"등록"}
                onClick={() => {
                  navigate("/SeniorInsert");
                }}
              />
              <Button className={"btn-small green-btn "} btnName={"삭제"} />
            </div> */}
          <Table className="equipment-detail" head={thead} contents={content} contentKey={key} />
        </div>
      </div>
    </main>
  );
}
