"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const helpers_1 = require("../../utils/helpers");
const i18n_hooks_1 = require("../../utils/i18n/i18n.hooks");
const period_1 = require("../utils/period");
const NonClickablePeriod = ({ start, end, status, cropped, direction, left, width, icon, statusLabel, restProps, periodRef, }) => {
    var _a;
    const translate = (0, i18n_hooks_1.useI18n)("Timeline");
    if (width === 0 || !Number.isFinite(width)) {
        return null;
    }
    if (!Number.isFinite(left)) {
        return null;
    }
    return (react_1.default.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: (0, helpers_1.cl)((0, period_1.getConditionalClasses)(cropped, direction, status), restProps === null || restProps === void 0 ? void 0 : restProps.className), style: {
            width: `${width.toFixed(3)}%`,
            [direction]: `${left.toFixed(3)}%`,
        } }),
        react_1.default.createElement("span", { className: "aksel-timeline__period--inner" },
            icon,
            react_1.default.createElement("span", { className: "aksel-sr-only" }, (0, period_1.ariaLabel)(start, end, status, statusLabel, translate)))));
};
exports.default = NonClickablePeriod;
//# sourceMappingURL=NonClickablePeriod.js.map