import { Select, Space, Typography, Tag, Skeleton } from 'antd';
import { ShopOutlined } from '@ant-design/icons';
import { useCompanyStore } from '@/stores/companyStore';
import { formatCVR } from '@/lib/formatters';
import type { Company } from '@/types/accounting';
const { Text } = Typography;
interface CompanySwitcherProps {
compact?: boolean;
}
export default function CompanySwitcher({ compact = false }: CompanySwitcherProps) {
const { activeCompany, setActiveCompany } = useCompanyStore();
const companies = useCompanyStore((state) => state.companies);
const handleCompanyChange = (companyId: string) => {
const company = companies.find((c) => c.id === companyId);
if (company) {
setActiveCompany(company);
}
};
if (companies.length === 0) {
return ;
}
return (
);
}