import { ExportTaxBar } from './Page06ExportTax';
import { ContentPage } from './ContentPage';
import type { BarChartCompareItem } from '../types/data';

interface Page07AssociationProps {
  loginPersonAssociation: BarChartCompareItem[];
  legalPersonAssociation: BarChartCompareItem[];
  chartDescriptions?: { loginPersonAssociation?: string; legalPersonAssociation?: string };
}

export const Page07Association = ({ loginPersonAssociation = [], legalPersonAssociation = [], chartDescriptions }: Page07AssociationProps) => {
  return (
    <ContentPage pageNumber={7} hidePageNumber={true}>
      <div className="flex flex-col space-y-8 -mx-[20px] px-[20px]">
        <ExportTaxBar title="登录人关联企业数量分布" data={loginPersonAssociation} description={chartDescriptions?.loginPersonAssociation} />
        <ExportTaxBar title="法定代表人关联企业数量分布" data={legalPersonAssociation} description={chartDescriptions?.legalPersonAssociation} />
      </div>
    </ContentPage>
  );
};
