import React from "react"; import { connect } from "react-redux"; import { ManageIcon } from "@dndbeyond/character-components/es"; import { CharacterTheme, ProficiencyGroup, rulesEngineSelectors, } from "@dndbeyond/character-rules-engine/es"; import { PaneInfo, useSidebar } from "~/contexts/Sidebar/Sidebar"; import { PaneComponentEnum } from "~/subApps/sheet/components/Sidebar/types"; import { Subsection, SubsectionFooter, } from "../../../Shared/components/Subsection"; import { appEnvSelectors } from "../../../Shared/selectors"; import { AppEnvDimensionsState } from "../../../Shared/stores/typings"; import ProficiencyGroupsBox from "../../components/ProficiencyGroupsBox"; import { SheetAppState } from "../../typings"; interface Props { dimensions: AppEnvDimensionsState; theme: CharacterTheme; proficiencyGroups: Array; isReadonly: boolean; paneHistoryStart: PaneInfo["paneHistoryStart"]; } class ProficiencyGroupsDesktop extends React.PureComponent { handleManageShow = (): void => { const { paneHistoryStart, isReadonly } = this.props; if (!isReadonly) { paneHistoryStart(PaneComponentEnum.PROFICIENCIES); } }; render() { const { dimensions, theme, proficiencyGroups, isReadonly } = this.props; return ( Proficiencies & Training ); } } function mapStateToProps(state: SheetAppState) { return { dimensions: appEnvSelectors.getDimensions(state), theme: rulesEngineSelectors.getCharacterTheme(state), proficiencyGroups: rulesEngineSelectors.getProficiencyGroups(state), isReadonly: appEnvSelectors.getIsReadonly(state), }; } const ProficiencyGroupsDesktopContainer = (props) => { const { pane: { paneHistoryStart }, } = useSidebar(); return ( ); }; export default connect(mapStateToProps)(ProficiencyGroupsDesktopContainer);