var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
import React from "react";
import DoubleChevronLeftSvg from "../Icons/DoubleChevronLeftSvg";
import DoubleChevronRightSvg from "../Icons/DoubleChevronRightSvg";
var VisibilityControl = /** @class */ (function (_super) {
    __extends(VisibilityControl, _super);
    function VisibilityControl() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.renderLeftArrow = function () {
            var _a = _this.props, isVisible = _a.isVisible, isLocked = _a.isLocked, alignment = _a.alignment, placement = _a.placement;
            return !isLocked && !isVisible;
        };
        _this.renderRightArrow = function () {
            var _a = _this.props, isVisible = _a.isVisible, isLocked = _a.isLocked, alignment = _a.alignment, placement = _a.placement;
            return isVisible;
        };
        return _this;
    }
    VisibilityControl.prototype.render = function () {
        var _a = this.props, isVisible = _a.isVisible, isLocked = _a.isLocked, alignment = _a.alignment, placement = _a.placement, onToggleVisibility = _a.onToggleVisibility;
        var iconClassName = isVisible ? "sidebar__control--collaspe" : "sidebar__control--expand";
        return (React.createElement("button", { className: "sidebar__control", onClick: onToggleVisibility },
            this.renderLeftArrow() &&
                React.createElement(DoubleChevronLeftSvg, { className: iconClassName }),
            this.renderRightArrow() &&
                React.createElement(DoubleChevronRightSvg, { className: iconClassName })));
    };
    return VisibilityControl;
}(React.PureComponent));
export default VisibilityControl;
//# sourceMappingURL=VisibilityControl.js.map