/**
 * DevExtreme (esm/renovation/ui/scheduler/appointment/reduced_icon_tooltip/layout.js)
 * Version: 22.2.7 (build 23185-0311)
 * Build date: Tue Jul 04 2023
 *
 * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
var _excluded = ["endDate", "target", "visible"];
import {
    createFragment,
    createComponentVNode
} from "inferno";
import {
    Fragment
} from "inferno";
import {
    BaseInfernoComponent
} from "@devextreme/runtime/inferno";
import {
    Tooltip
} from "../../../overlays/tooltip";
import {
    getReducedIconTooltipText
} from "../utils";
var wrapperAttr = {
    class: "dx-scheduler-reduced-icon-tooltip"
};
export var viewFunction = _ref => {
    var {
        props: {
            target: target,
            visible: visible
        },
        text: text
    } = _ref;
    return createComponentVNode(2, Tooltip, {
        visible: visible,
        target: target,
        wrapperAttr: wrapperAttr,
        children: createFragment(text, 0)
    })
};
export var ReducedIconTooltipProps = {
    visible: false
};
export class ReducedIconTooltip extends BaseInfernoComponent {
    constructor(props) {
        super(props);
        this.state = {}
    }
    get text() {
        return getReducedIconTooltipText(this.props.endDate)
    }
    get restAttributes() {
        var _this$props = this.props,
            restProps = _objectWithoutPropertiesLoose(_this$props, _excluded);
        return restProps
    }
    render() {
        var props = this.props;
        return viewFunction({
            props: _extends({}, props),
            text: this.text,
            restAttributes: this.restAttributes
        })
    }
}
ReducedIconTooltip.defaultProps = ReducedIconTooltipProps;
