import { jsx as _jsx } from "react/jsx-runtime";
import { InlineTextEdit } from '../../../CommonUI/InlineTextEdit';
import { ObserveState } from '../../../CommonUI/StateManagement/ObserveState';
import { BaseSequenceTitle } from '../BaseSequenceTitle';
import { TitleDiv } from '../CommonStyles';
export class RegularSequenceTitle extends BaseSequenceTitle {
    render() {
        const { sequence, displayBehavior } = this.props;
        return _jsx(ObserveState, { listenTo: sequence, properties: ["name"], control: () => _jsx(TitleDiv, Object.assign({ className: "inline-editor", content: sequence.name, isCollapsed: displayBehavior.isCollapsed(sequence), isNormal: sequence.isNormal, styles: displayBehavior.getSequenceTitleStyle(sequence) }, { children: _jsx(InlineTextEdit, { text: sequence.name || (sequence.isPrimary ? 'Primary' : ''), placeholder: !sequence.isPrimary ? 'unnamed' : 'Primary', onEdit: (newValue) => this.onUpdateStackName(sequence, newValue), readOnly: !sequence.isNormal }, void 0) }), void 0) }, void 0);
    }
}
//# sourceMappingURL=SequenceTitle.js.map