import { PATHS } from '@/shared/constants/paths';
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
import { HeaderType } from '@/entities/common/model/types';
import { IMAGE_ROOT } from '@/shared/constants/common';
import { 
	useSetHeaderTitle,
	useSetHeaderType,
	useSetFooterMode,
  useSetOnBack
} from '@/widgets/sub-layout/use-sub-layout';

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

  useSetHeaderTitle('알림톡 결제통보');
  useSetHeaderType(HeaderType.LeftArrow);
  useSetFooterMode(false);
  useSetOnBack(() => {
    navigate(PATHS.home);
  });

  const onClickToNavigate = () => {
    navigate(PATHS.additionalService.kakaoPaymentNotification.setting);
  };

  return (
    <>
      <main>
        <div className="tab-content">
          <div className="tab-pane sub active">
            <section className="summary-section no-border">
              <div className="credit-controls">
                <div>
                  <input 
                    className="credit-period" 
                    type="text" 
                    value="2025.06.01 ~ 2025.06.31" 
                    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>
            </section>
              
            <section className="transaction-list">
              <div className="date-group">
                <div className="date-header">25.06.08(일)</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">김*환(7000)</div>
                    <div className="transaction-details">
                      <span>nictest01m</span>
                      <span className="separator">ㅣ</span>
                      <span>가상계좌 요청</span>
                    </div>
                  </div>
                  <div className="status-label success">성공</div>
                </div>

                <div className="transaction-item refund">
                  <div className="transaction-status">
                    <div className="status-dot gray"></div>
                  </div>
                  <div className="transaction-content">
                    <div className="transaction-title">최*길(010333*****)</div>
                    <div className="transaction-details">
                      <span>nictest01m</span>
                      <span className="separator">ㅣ</span>
                      <span>가상계좌 요청+입금</span>
                    </div>
                  </div>
                  <div className="status-label fail">실패</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">박*준(010333*****)</div>
                    <div className="transaction-details">
                      <span>nictest01m</span>
                      <span className="separator">ㅣ</span>
                      <span>가상계좌 요청+입금</span>
                    </div>
                  </div>
                  <div className="status-label success">성공</div>
                </div>

                <div className="transaction-item refund">
                  <div className="transaction-status">
                    <div className="status-dot gray"></div>
                  </div>
                  <div className="transaction-content">
                    <div className="transaction-title">이*신(010333*****)</div>
                    <div className="transaction-details">
                      <span>nictest01m</span><span className="separator">ㅣ</span><span>가상계좌 요청</span>
                    </div>
                  </div>
                  <div className="status-label fail">실패</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">김*환(010333*****)</div>
                    <div className="transaction-details">
                      <span>nictest01m</span><span className="separator">ㅣ</span><span>가상계좌 요청</span>
                    </div>
                  </div>
                  <div className="status-label success">성공</div>
                </div>
              </div>
            </section>
          </div>
        </div>
      </main>
      <div className="apply-row">
        <button 
          className="btn-50 btn-blue flex-1"
          onClick={ () => onClickToNavigate() }
        >서비스 설정</button>
      </div>
    </>
  );
};