import { useState } from 'react';
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 { SettlementAgencyMemberWrap } from '@/entities/additional-service/ui/settlement-agency/settlement-agency-member-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 SettlementAgencyMemberPage = () => {
  const { navigate } = useNavigate();

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

  useSetHeaderTitle('정산대행');
  useSetHeaderType(HeaderType.LeftArrow);
  useSetFooterMode(true);
  useSetOnBack(() => {
    navigate(PATHS.home);
  });

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