import React from 'react';
import { PropertiesTable, registerWidget, Value } from '../Value';
import { Heading } from '../widgetUtils';
registerWidget('model', function (_a) {
    var value = _a.value;
    return (React.createElement(React.Fragment, null,
        React.createElement(Heading, null, "State"),
        React.createElement(PropertiesTable, { properties: value.state, showDefault: false }),
        React.createElement(Heading, null, "Events"),
        React.createElement(PropertiesTable, { properties: value.events, showDefault: false }),
        value.modelProperties.length > 0 && (React.createElement(React.Fragment, null,
            React.createElement(Heading, null, "Additional Properties"),
            React.createElement(PropertiesTable, { properties: value.modelProperties, showDefault: false })))));
});
registerWidget('modelHook', function (_a) {
    var value = _a.value, doc = _a.doc;
    return (React.createElement("code", null,
        React.createElement("span", { className: "token symbol" }, value.name),
        ' ',
        React.createElement("span", { className: "token punctuation" }, "("),
        React.createElement("span", { className: "value symbol" }, "config"),
        ":",
        ' ',
        React.createElement(Value, { value: { kind: 'symbol', name: value.name.replace('use', '') + "Config" } }),
        React.createElement("span", { className: "token punctuation" }, "): "),
        React.createElement(Value, { value: { kind: 'symbol', name: "" + value.name.replace('use', '') } })));
});
