import { CCBaseShapeUtil } from '../CCBaseShapeUtil' import { CCBaseShape } from '../cc-types' import { ccGraphShapeProps, getDefaultCCPlannerNodeProps } from './cc-graph-props' import { getNodeStyles, NODE_THEMES, NODE_TYPE_THEMES } from './cc-graph-styles' import { CCPlannerNodeProps } from './cc-graph-types' export interface CCPlannerNodeShape extends CCBaseShape { type: 'cc-planner-node' props: CCPlannerNodeProps } export class CCPlannerNodeShapeUtil extends CCBaseShapeUtil { static type = 'cc-planner-node' as const static props = ccGraphShapeProps['cc-planner-node'] getDefaultProps(): CCPlannerNodeShape['props'] { const defaultProps = getDefaultCCPlannerNodeProps() const theme = NODE_THEMES[NODE_TYPE_THEMES[CCPlannerNodeShapeUtil.type]] ?? NODE_THEMES.resource return { ...defaultProps, headerColor: theme.headerColor, } } DefaultComponent = () => null renderContent = (shape: CCPlannerNodeShape) => { const styles = getNodeStyles(shape.type) return (
Planner
Lesson and weekly planner
) } }