"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RenderSequenceActions = void 0;
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const AutoBind_1 = require("@appglue/common/dist/Common/AutoBind");
const CollapseIcon_1 = require("../../../CommonUI/Icon/CollapseIcon");
const DeleteGrayIcon_1 = require("../../../CommonUI/Icon/DeleteGrayIcon");
const DragIcon_1 = require("../../../CommonUI/Icon/DragIcon");
const EditStackLightIcon_1 = require("../../../CommonUI/Icon/EditStackLightIcon");
const ExpandGrayIcon_1 = require("../../../CommonUI/Icon/ExpandGrayIcon");
const BaseSequenceActions_1 = require("../BaseSequenceActions");
const CommonStyles_1 = require("../CommonStyles");
class RenderSequenceActions extends BaseSequenceActions_1.BaseSequenceActions {
    onToggleIsCollapsed(event) {
        event.stopPropagation();
        this.props.sequence.isCollapsed = !this.props.sequence.isCollapsed;
    }
    render() {
        const sequence = this.props.sequence;
        return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(CommonStyles_1.StyledIconButton, { children: (0, jsx_runtime_1.jsx)(EditStackLightIcon_1.EditStackLightIcon, {}) }), sequence.isNormal && !sequence.isPrimary && ((0, jsx_runtime_1.jsx)(CommonStyles_1.StyledIconButton, { "data-testid": `${sequence._id}-btn-delete`, onClick: this.onDeleteSequence, children: (0, jsx_runtime_1.jsx)(DeleteGrayIcon_1.DeleteGrayIcon, {}) })), (0, jsx_runtime_1.jsx)(CommonStyles_1.StyledIconButton, { onClick: this.onToggleIsCollapsed, "data-testid": `${sequence._id}_btn-collapse`, children: sequence.isCollapsed ? (0, jsx_runtime_1.jsx)(ExpandGrayIcon_1.ExpandGrayIcon, {}) : (0, jsx_runtime_1.jsx)(CollapseIcon_1.CollapseIcon, {}) }), !sequence.isPrimary && sequence.isNormal && ((0, jsx_runtime_1.jsx)(CommonStyles_1.StyledIconButton, { className: "stack-move", children: (0, jsx_runtime_1.jsx)(DragIcon_1.DragIcon, {}) }))] }));
    }
}
tslib_1.__decorate([
    AutoBind_1.AutoBind
], RenderSequenceActions.prototype, "onToggleIsCollapsed", null);
exports.RenderSequenceActions = RenderSequenceActions;
//# sourceMappingURL=RenderSequenceActions.js.map