import React from "react";
import { Icon } from "../icon/Icon";
import { useSelector } from "react-redux";
/**
 * Displays the tab's icon and text. Editing of titles is handled within this component.
 */
export const TabTitle = ({ tabWindowName }) => {
    var _a;
    const state = useSelector((currentState) => currentState);
    const myState = tabWindowName ? state.windows[tabWindowName] : null;
    const title = (_a = myState === null || myState === void 0 ? void 0 : myState.title) !== null && _a !== void 0 ? _a : "";
    const icon = myState === null || myState === void 0 ? void 0 : myState.icon;
    return (React.createElement("div", { className: "fsbl-tab-title" },
        icon && React.createElement(Icon, { ...icon, category: "Application" }),
        React.createElement("span", { className: "fsbl-tab-title-text" }, title)));
};
//# sourceMappingURL=TabTitle.js.map