{
  "version": 3,
  "sources": ["../../board/board_title.tsx"],
  "sourcesContent": ["import * as React from \"react\"\nimport {BoardInfo, Board, BoardType} from \"@cling/lib.shared.model\"\nimport {observer} from \"mobx-react\"\nimport {current_user} from \"../state/index\"\nimport {PrincipalInfo} from \"../account/principal_info\"\nimport {decorate_emojis} from \"@cling/lib.web.utils/decorate_emojis\"\nimport {escape_html} from \"@cling/lib.shared.utils\"\nimport {board_name} from \"./board_name\"\nimport {i18n} from \"@cling/lib.web.i18n\"\nimport {classNames} from \"@cling/lib.web.utils\"\n\nexport const BoardTitle = ({\n    board,\n    title_override,\n    className,\n    \"data-test-id\": data_test_id,\n    onClick,\n}: {\n    board: Board | BoardInfo | undefined\n    title_override?: string\n    className?: string\n    \"data-test-id\"?: string\n    onClick?: React.MouseEventHandler<HTMLDivElement>\n}) => {\n    const archived = board\n        ? current_user.account_settings.board_setting(board.uid)?.archived\n        : false\n    let title\n    if (title_override) {\n        title = <span>{title_override}</span>\n    } else if (!board) {\n        title = <span>...</span>\n    } else {\n        title = <ObservingBoardTitle board={board} />\n    }\n    return (\n        <h1\n            className={classNames(\"board-title\", className)}\n            data-test-id={data_test_id}\n            onClick={onClick}\n        >\n            <span className=\"board-title__text\">\n                {archived && <span className=\"board-title__archived\">[{i18n.archived}]</span>}\n                {title}\n            </span>\n        </h1>\n    )\n}\n\nconst ObservingBoardTitle = observer(({board}: {board: BoardInfo | Board}) => {\n    if (board.board_type === BoardType.dashboard) {\n        return <span>Cling</span>\n    } else if (board.board_type === BoardType.people) {\n        const shared_with = board.people_board_shared_with(current_user.account.uid)\n        return (\n            <div className=\"board-title__people-board\">\n                <div className=\"board-title__people-board-avatar\">\n                    <PrincipalInfo display=\"avatar\" uid={shared_with} />\n                </div>\n                <PrincipalInfo\n                    className=\"board-title__people-board-name\"\n                    display=\"full_name\"\n                    uid={shared_with}\n                />\n            </div>\n        )\n    } else {\n        return (\n            <span\n                dangerouslySetInnerHTML={{\n                    __html: decorate_emojis(escape_html(board_name(board, {mark_archived: false}))),\n                }}\n            />\n        )\n    }\n})\n"],
  "mappings": "uZAAAA,IAWO,IAAMC,EAAaC,EAAA,CAAC,CACvB,MAAAC,EACA,eAAAC,EACA,UAAAC,EACA,eAAgBC,EAChB,QAAAC,CACJ,IAMM,CACF,IAAMC,EAAWL,EACXM,EAAa,iBAAiB,cAAcN,EAAM,GAAG,GAAG,SACxD,GACFO,EACJ,OAAIN,EACAM,EAAQC,EAAC,YAAMP,CAAe,EACtBD,EAGRO,EAAQC,EAACC,EAAA,CAAoB,MAAOT,EAAO,EAF3CO,EAAQC,EAAC,YAAK,KAAG,EAKjBA,EAAC,MACG,UAAWE,EAAW,cAAeR,CAAS,EAC9C,eAAcC,EACd,QAASC,GAETI,EAAC,QAAK,UAAU,qBACXH,GAAYG,EAAC,QAAK,UAAU,yBAAwB,IAAEG,EAAK,SAAS,GAAC,EACrEJ,CACL,CACJ,CAER,EApC0B,cAsCpBE,EAAsBG,EAAS,CAAC,CAAC,MAAAZ,CAAK,IAAkC,CAC1E,GAAIA,EAAM,aAAe,EACrB,OAAOQ,EAAC,YAAK,OAAK,EACf,GAAIR,EAAM,aAAe,EAAkB,CAC9C,IAAMa,EAAcb,EAAM,yBAAyBM,EAAa,QAAQ,GAAG,EAC3E,OACIE,EAAC,OAAI,UAAU,6BACXA,EAAC,OAAI,UAAU,oCACXA,EAACM,EAAA,CAAc,QAAQ,SAAS,IAAKD,EAAa,CACtD,EACAL,EAACM,EAAA,CACG,UAAU,iCACV,QAAQ,YACR,IAAKD,EACT,CACJ,CAER,KACI,QACIL,EAAC,QACG,wBAAyB,CACrB,OAAQO,EAAgBC,EAAYC,EAAWjB,EAAO,CAAC,cAAe,EAAK,CAAC,CAAC,CAAC,CAClF,EACJ,CAGZ,CAAC",
  "names": ["init_compat_module", "BoardTitle", "__name", "board", "title_override", "className", "data_test_id", "onClick", "archived", "current_user", "title", "_", "ObservingBoardTitle", "classNames", "i18n", "observer", "shared_with", "PrincipalInfo", "decorate_emojis", "escape_html", "board_name"]
}