import * as React from "react"; import * as cx from "classnames"; import { PCSourceTagNames, getPCNode, DependencyGraph, SyntheticElement, PCVisibleNode, isPCContentNode, isElementLikePCNode, isTextLikePCNode } from "paperclip"; import { BasePropertiesProps, ElementProps } from "./view.pc"; import { InspectorNode } from "paperclip"; import { Dispatch } from "redux"; export type PropertiesControllerOuterProps = {}; export type Props = { visible: boolean; selectedNodes: SyntheticElement[]; selectedInspectorNodes: InspectorNode[]; graph: DependencyGraph; className?: string; dispatch: Dispatch; sourceNodeUri: string; rootInspectorNode: InspectorNode; } & ElementProps; export default (Base: React.ComponentClass) => class PropertiesController extends React.PureComponent { render() { const { visible, className, selectedInspectorNodes, rootInspectorNode, selectedNodes, graph, dispatch, sourceNodeUri, ...rest } = this.props; if (!selectedInspectorNodes.length || !visible) { return null; } const selectedNode = selectedInspectorNodes[0]; const sourceNode = getPCNode(selectedNode.sourceNodeId, graph); return ( ); } };