import React from 'react';
import { Organization } from '@/types.ts';
import SimilarOrganizations from '@/components/organization/SimilarOrganizations.tsx';
import OrganizationStatistics from '@/components/organization/OrganizationStatistics.tsx';
import { Stack } from '@/components/ui/layout';

interface OrganizationSidebarProps {
  organization: Organization;
  similarOrgs: Organization[];
  onSelectOrg: (org: Organization) => void;
}

const OrganizationSidebar = ({
  organization,
  similarOrgs,
  onSelectOrg,
}: OrganizationSidebarProps) => {
  return (
    <Stack spacing="2xl">
      <OrganizationStatistics organizationId={organization.ID} />
      <SimilarOrganizations organizations={similarOrgs} onSelectOrg={onSelectOrg} />
    </Stack>
  );
};

export default React.memo(OrganizationSidebar);
