import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { PATHS } from '@/shared/constants/paths';
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
import { SettlementAgencyTab } from '@/entities/additional-service/ui/settlement-agency/settlement-agency-tab';
import { SettlementAgencyDepositWrap } from '@/entities/additional-service/ui/settlement-agency/settlement-agency-deposit-wrap';
import { SettlementAgencyTabKeys } from '@/entities/additional-service/model/types';
import { HeaderType } from '@/entities/common/model/types';
import {
  useSetHeaderTitle,
  useSetHeaderType,
  useSetFooterMode,
  useSetOnBack
} from '@/widgets/sub-layout/use-sub-layout';

export const SettlementAgencyDepositPage = () => {
  const { t } = useTranslation();
  const { navigate } = useNavigate();

  const [activeTab, setActiveTab] = useState<SettlementAgencyTabKeys>(SettlementAgencyTabKeys.Deposit);

  useSetHeaderTitle(t('additionalService.settlementAgency.title'));
  useSetHeaderType(HeaderType.LeftArrow);
  useSetFooterMode(false);
  useSetOnBack(() => {
    navigate(PATHS.home);
  });

  return (
    <>
      <main>
        <div className="tab-content">
          <div className="tab-pane sub active">
            <SettlementAgencyTab activeTab={ activeTab }></SettlementAgencyTab>
            <SettlementAgencyDepositWrap></SettlementAgencyDepositWrap>
          </div>
        </div>
      </main>
    </>
  );
};