var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
import { Grid, makeStyles } from '@material-ui/core';
import React, { forwardRef } from 'react';
import FluentPrimaryStatNumber from '../../FluentComponents/molecules/FluentPrimaryStatNumber';
import FluentSecondaryStatNumber from '../../FluentComponents/molecules/FluentSecondaryStatNumber';
import WidgetCard from '../../WidgetCard';
const useStyles = makeStyles((theme) => ({
    column: {
        width: 160
    }
}));
export const layout = {
    w: { default: 2, min: 0, max: 4 },
    h: { default: 2, min: 0, max: 4 }
};
const DateTrendWidget = (props, ref) => {
    const classes = useStyles();
    const { children, params, setParam } = props, other = __rest(props, ["children", "params", "setParam"]);
    const { mockData, apiUrl, theme } = params;
    return (React.createElement(WidgetCard, Object.assign({ ref: ref }, other, { title: mockData === null || mockData === void 0 ? void 0 : mockData.title, theme: theme }), React.createElement(Grid, { container: true, direction: "row", spacing: 1 }, React.createElement(Grid, { item: true, className: classes.column }, React.createElement(FluentPrimaryStatNumber, { mainStat: mockData === null || mockData === void 0 ? void 0 : mockData.primary.value, mainLabel: mockData === null || mockData === void 0 ? void 0 : mockData.primary.label })), React.createElement(Grid, { item: true }, mockData === null || mockData === void 0 ? void 0 : mockData.secondary.map((secondary) => (React.createElement(Grid, { item: true, key: secondary.category }, React.createElement(FluentSecondaryStatNumber, { secondaryStat: secondary.value, secondaryLabel: secondary.category, trend: secondary.value < 0 ? 'down' : 'up' })))))), children));
};
export default forwardRef(DateTrendWidget);
//# sourceMappingURL=DateTrendWidget.js.map