import React from "react";
import { cl } from "../../utils/helpers/index.js";
import { useI18n } from "../../utils/i18n/i18n.hooks.js";
import { ariaLabel, getConditionalClasses } from "../utils/period.js";
const NonClickablePeriod = ({ start, end, status, cropped, direction, left, width, icon, statusLabel, restProps, periodRef, }) => {
    var _a;
    const translate = useI18n("Timeline");
    if (width === 0 || !Number.isFinite(width)) {
        return null;
    }
    if (!Number.isFinite(left)) {
        return null;
    }
    return (React.createElement("div", Object.assign({ "data-timeline-period": true, ref: periodRef, tabIndex: -1 }, restProps, { "data-color": (_a = restProps === null || restProps === void 0 ? void 0 : restProps["data-color"]) !== null && _a !== void 0 ? _a : status, className: cl(getConditionalClasses(cropped, direction, status), restProps === null || restProps === void 0 ? void 0 : restProps.className), style: {
            width: `${width.toFixed(3)}%`,
            [direction]: `${left.toFixed(3)}%`,
        } }),
        React.createElement("span", { className: "aksel-timeline__period--inner" },
            icon,
            React.createElement("span", { className: "aksel-sr-only" }, ariaLabel(start, end, status, statusLabel, translate)))));
};
export default NonClickablePeriod;
//# sourceMappingURL=NonClickablePeriod.js.map