import { jsx } from "react/jsx-runtime";
import { AgentProject, ApiProject, BusinessProcessProject, CaseManagementProject, ConnectorBuilderProject, HumanIcon, RpaProject } from "../../icons/index.js";
import { AutopilotIcon, ConfigurationIcon, CreateIcon, DurationIcon, MoreIcon, QueueIcon } from "../../../icons/index.js";
import { TaskIconContainer } from "./TaskIcon.styles.js";
import { TaskItemTypeValues } from "./TaskIcon.types.js";
const SIZE_CONFIG = {
    sm: {
        container: 24,
        icon: 16,
        borderRadius: 4
    },
    md: {
        container: 32,
        icon: 24,
        borderRadius: 8
    },
    lg: {
        container: 72,
        icon: 48,
        borderRadius: 8
    }
};
const getIconForType = (type, iconSize)=>{
    switch(type){
        case TaskItemTypeValues.Agent:
            return /*#__PURE__*/ jsx(AgentProject, {
                w: iconSize,
                h: iconSize
            });
        case TaskItemTypeValues.ExternalAgent:
            return /*#__PURE__*/ jsx(AutopilotIcon, {
                size: iconSize
            });
        case TaskItemTypeValues.Automation:
            return /*#__PURE__*/ jsx(RpaProject, {
                w: iconSize,
                h: iconSize
            });
        case TaskItemTypeValues.ApiAutomation:
            return /*#__PURE__*/ jsx(ApiProject, {
                w: iconSize,
                h: iconSize
            });
        case TaskItemTypeValues.User:
            return /*#__PURE__*/ jsx(HumanIcon, {
                w: iconSize,
                h: iconSize
            });
        case TaskItemTypeValues.AgenticProcess:
            return /*#__PURE__*/ jsx(BusinessProcessProject, {
                w: iconSize,
                h: iconSize
            });
        case TaskItemTypeValues.Connector:
            return /*#__PURE__*/ jsx(ConnectorBuilderProject, {
                w: iconSize,
                h: iconSize
            });
        case TaskItemTypeValues.Timer:
            return /*#__PURE__*/ jsx(DurationIcon, {
                size: iconSize
            });
        case TaskItemTypeValues.CaseManagement:
            return /*#__PURE__*/ jsx(CaseManagementProject, {
                w: iconSize,
                h: iconSize
            });
        case TaskItemTypeValues.Queues:
            return /*#__PURE__*/ jsx(QueueIcon, {
                size: iconSize
            });
        case TaskItemTypeValues.Tools:
            return /*#__PURE__*/ jsx(ConfigurationIcon, {
                size: iconSize
            });
        case TaskItemTypeValues.MoreElements:
            return /*#__PURE__*/ jsx(MoreIcon, {
                size: iconSize
            });
        case TaskItemTypeValues.CreateNew:
            return /*#__PURE__*/ jsx(CreateIcon, {
                size: iconSize
            });
    }
};
const TaskIcon = ({ type, size = 'md' })=>{
    const { container, icon, borderRadius } = SIZE_CONFIG[size];
    const displayIcon = getIconForType(type, icon);
    return /*#__PURE__*/ jsx(TaskIconContainer, {
        $size: container,
        $taskType: type,
        $borderRadius: borderRadius,
        children: displayIcon
    });
};
export { TaskIcon };
