import { useState } from 'react';
import { PATHS } from '@/shared/constants/paths';
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
import { SettlementTab } from '@/entities/settlement/ui/settlement-tab';
import { CalendarWrap } from '@/entities/settlement/ui/calandar-wrap';
import { SettlementTabKeys } from '@/entities/settlement/model/types';
import { HeaderType } from '@/entities/common/model/types';
import {
	useSetHeaderTitle,
	useSetHeaderType,
	useSetFooterMode,
  useSetOnBack
} from '@/widgets/sub-layout/use-sub-layout';
import { useTranslation } from 'react-i18next';

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

  const [activeTab, setActiveTab] = useState<SettlementTabKeys>(SettlementTabKeys.Calendar);

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

  return (
    <>
      <main>
        <div className="tab-content">
          <div className="tab-pane pt-46 active">
            <SettlementTab activeTab={ activeTab }></SettlementTab>
            <CalendarWrap></CalendarWrap>
          </div>
        </div>
      </main>
    </>
  );
};