import { useState } from "react";
import Scrollbutton from "react-bootstrap/Button";
import { ArrowUp, ArrowDown } from "react-bootstrap-icons";

const NewYorkCaption = (props) => {
  const { fetchedCase, displayCopy, onScrollClick } = props;

  return (
    <>
      <div className="docedit-super-row">
        <div className="docedit-uppercol1"></div>
        <div className="docedit-uppercol2">
          <span>{fetchedCase?.jurisdiction}</span>
          <span>{fetchedCase?.venue}</span>
          <div className="pleading-divider-box">
            <div>
              -----------------------------------------------------------------------X
            </div>
          </div>
        </div>
        <div className="docedit-uppercol3"></div>
      </div>
      <div className="docedit-header-row">
        <div className="docedit-header-col1">
          <div className="docedit-header-text">Edit Document</div>
        </div>
        <div className="docedit-header-col2">
          <div className="header-middle-row1">
            {fetchedCase?.caption ? fetchedCase?.caption : <></>},
          </div>
          <div className="header-middle-row2">
            <div className="content-spacer"></div>
            <div className="middle-row-inner">
              <div>Plaintiff(s),</div>
              <div className="casenum-box">
                Index no. {fetchedCase?.caseNumber}
              </div>
            </div>
          </div>
          <div className="header-middle-row3">
            <div>{displayCopy.versusText}</div>
            <div>Judge: {fetchedCase?.judge}</div>
          </div>
          <div className="header-middle-row4">
            {fetchedCase?.captionTwo ? fetchedCase?.captionTwo : <></>},
          </div>
          <div className="header-middle-row5">
            <div className="content-spacer2"></div>
            <div>Defendant(s)</div>
          </div>
          <div className="pleading-divider-box">
            <div>
              ----------------------------------------------------------------------------X
            </div>
          </div>
        </div>
        <div className="docedit-header-col3">
          <div className="scroll-button-box">
            <Scrollbutton onClick={onScrollClick} className="scroll-button">
              Scroll <ArrowUp /> <ArrowDown />
            </Scrollbutton>
          </div>
        </div>
      </div>
    </>
  );
};

export default NewYorkCaption;
