import { TeamOutlined } from "@ant-design/icons";
import { Typography } from "antd";

const { Title, Text } = Typography;
const DeptInfo = ({ path }) => {
    return (
        <div className="gap-1 flex items-center flex-grow">
            <TeamOutlined className="text-blue-500 text-lg transform group-hover:scale-110 transition-transform duration-300" />
            {path?.depts && path?.depts?.length > 0 ? (
                <Text className="font-medium text-blue-500 hover:text-blue-600 transition-colors duration-300 truncate max-w-[120px]">
                    {path?.depts?.length > 1 ? `${path.depts[0].name}等` : path?.depts?.[0]?.name}
                </Text>
            ) : (
                <Text className="font-medium text-blue-500 hover:text-blue-600 transition-colors duration-300 truncate max-w-[120px]">
                    未设置单位
                </Text>
            )}
        </div>
    );
};

export default DeptInfo;