import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
// (C) 2019-2025 GoodData Corporation
import { Button } from "@gooddata/sdk-ui-kit";
const getIconType = (type, isDateAttribute) => {
    if (isDateAttribute) {
        return "date";
    }
    if (type === "measure") {
        return "metric";
    }
    return type;
};
export function DrillOriginItem({ onDelete, title, type, isDateAttribute }) {
    const iconType = getIconType(type, isDateAttribute);
    const iconClassName = `dm-button-icon dm-button-icon-${iconType}`;
    return (_jsxs("div", { className: "gd-drill-config-measure-item", children: [
            _jsx("div", { className: iconClassName }), _jsx("div", { className: "dm-button-title s-drill-config-item-title", title: title, children: title }), _jsx("div", { className: "dm-button-delete-wrapper", children: _jsx(Button, { className: "drill-config-item-delete gd-button-link gd-button-icon-only gd-icon-cross s-drill-config-item-delete", onClick: onDelete }) })
        ] }));
}
