"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
require("../stylesheets/header.scss");
require("../stylesheets/select.scss");
const classnames_1 = __importDefault(require("classnames"));
const React = __importStar(require("react"));
// import InlineInput from './Inputs/InlineInput';
class Header extends React.Component {
    constructor(props) {
        super(props);
        this.toggleHeaderOptions = this.toggleHeaderOptions.bind(this);
        this.state = {
            showUpdateDescriptionInput: false,
            showUpdateNameInput: false,
            showHeaderOptions: false
        };
    }
    updateDescriptionBlurHandler(e) {
        e.which = 13;
        this.props.updateDescriptionHandler(e);
        this.setState({ showUpdateDescriptionInput: false });
    }
    updateNameBlurHandler(e) {
        e.which = 13;
        this.props.updateStoryNameHandler(e);
        this.setState({ showUpdateNameInput: false });
    }
    toggleHeaderOptions() {
        this.setState({ showHeaderOptions: !this.state.showHeaderOptions });
    }
    render() {
        const { name, description
        // updateStoryNameHandler,
        // updateDescriptionHandler,
        // deleteHandler,
        // importHandler,
        // duplicateHandler,
        // exportHandler
         } = this.props;
        return (React.createElement("div", { className: "header" },
            React.createElement("div", { className: "header__meta" },
                React.createElement("div", { className: classnames_1.default('header__name', {
                        'header__name--edit': this.state.showUpdateNameInput
                    }), onClick: () => this.setState({ showUpdateNameInput: true }) }, name),
                React.createElement("div", { className: classnames_1.default('header__description', {
                        'header__description--edit': this.state.showUpdateDescriptionInput
                    }), onClick: () => this.setState({ showUpdateDescriptionInput: true }) }, description))));
    }
}
exports.default = Header;
//# sourceMappingURL=header.js.map