import { PATHS } from '@/shared/constants/paths';
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
import { IMAGE_ROOT } from '@/shared/constants/common';

export const SettlementAgencyManageWrap = () => {
  const { navigate } = useNavigate();

  const onClickToRegister = () => {
    navigate(PATHS.additionalService.settlementAgency.register);
  };
  const onClickToDetail = () => {
    navigate(PATHS.additionalService.settlementAgency.detail);
  };
  
  return (
    <>
      <section className="summary-section pt-30">
        <div className="credit-controls">
          <div>
            <input 
              className="credit-period"
              type="text"
              value="2025.06.01 ~ 2025.06.30"
              readOnly={ true }
            />
            <button 
              className="filter-btn" 
              aria-label="필터"
            >
              <img 
                src={ IMAGE_ROOT + '/ico_setting.svg' }
                alt="검색옵션"
              />
            </button>
          </div>
          <button 
            className="download-btn"
            aria-label="다운로드"
          >
            <img 
              src={ IMAGE_ROOT + '/ico_download.svg' } 
              alt="다운로드"
            />
          </button>
        </div>
        <div className="account-frame">
          <div className="credit-summary">
            <div className="row horizontal">
              <span className="label">예치금 잔액</span>
              <span className="amount20">83,745,200<span className="unit">원</span></span>
              <span className="count.horizontal">(2,745건)</span>
            </div>
            <div className="summary-amount divTop">
              <span className="amount-text states">정산 현황</span>
              <button>
                <img 
                  src={ IMAGE_ROOT + '/ico_divTop_arrow.svg' }
                  alt="화살표"
                />
              </button>
            </div>
          </div>
          <div className="summary-extend">
            <ul className="summary-amount-list bdr-6">
              <li className="summary-amount-item">
                <span className="label">동의대기</span>
                <span className="value">50<span className="unit"> 건</span></span>
              </li>
              <li className="summary-amount-item">
                <span className="label">동의완료</span>
                <span className="value">150<span className="unit"> 건</span></span>
              </li>
              <li className="summary-amount-item">
                <span className="label">동의거절</span>
                <span className="value">0<span className="unit"> 건</span></span>
              </li>
              <li className="summary-amount-item">
                <span className="label">동의기한 초과</span>
                <span className="value">5<span className="unit"> 건</span></span>
              </li>
              <li className="summary-amount-item">
                <span className="label">출금성공</span>
                <span className="value">300<span className="unit"> 건</span></span>
              </li>
              <li className="summary-amount-item">
                <span className="label">출금실패</span>
                <span className="value">0<span className="unit"> 건</span></span>
              </li>
              <li className="summary-amount-item">
                <span className="label">환수안내</span>
                <span className="value">0<span className="unit"> 건</span></span>
              </li>
            </ul>
          </div>
        </div>
      </section>
      <section className="filter-section">
        <div className="sort-options">
          <button className="sort-btn active">최신순</button>
          <span className="sort-divider">|</span>
          <button className="sort-btn">고액순</button>
        </div>
        <div className="excrow">
          <div className="notice-tabs sub">
            <button className="tab36 on">전체</button>
            <button className="tab36">동의대기</button>
            <button className="tab36">동의완료</button>
          </div>
        </div>
      </section>
      <section className="transaction-list">
        <div className="date-header">25.06.08(일)</div>
        <div 
          className="transaction-item approved"
          onClick={ () => onClickToDetail() }
        >
          <div className="transaction-status">
            <div className="status-dot blue"></div>
          </div>
          <div className="transaction-content">
            <div className="transaction-title">AB25061012 (BACK001)</div>
            <div className="transaction-details">
              <span>정산일 : 06.08</span>
              <span className="separator">ㅣ</span>
              <span>동의완료</span>
            </div>
          </div>
          <div className="transaction-amount">10,000,000원</div>
        </div>
        <div className="transaction-item approved">
          <div className="transaction-status">
            <div className="status-dot blue"></div>
          </div>
          <div className="transaction-content">
            <div className="transaction-title">AB25061012 (BACK001)</div>
            <div className="transaction-details">
              <span>정산일 : 06.08</span>
              <span className="separator">ㅣ</span>
              <span>동의완료</span>
            </div>
          </div>
          <div className="transaction-amount">10,000,000원</div>
        </div>
        <div className="transaction-item approved">
          <div className="transaction-status">
            <div className="status-dot gray"></div>
          </div>
          <div className="transaction-content">
            <div className="transaction-title">AB25061012 (BACK001)</div>
            <div className="transaction-details">
              <span>정산일 : 06.08</span>
              <span className="separator">ㅣ</span>
              <span>출금실패</span>
            </div>
          </div>
          <div className="transaction-amount">10,000,000원</div>
        </div>
      </section>
      <div className="apply-row">
        <button 
          className ="btn-50 btn-blue flex-1"
          onClick={ () => onClickToRegister() }
        >수기 등록</button>
      </div>
    </>
  );
};