"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExpressionMathStories = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const ExpressionConfiguration_1 = require("@appglue/common/dist/Expressions/ExpressionConfiguration");
const ExpressionBuilder_1 = require("../ExpressionBuilder");
const MathData_1 = require("../Testing/MathData");
const MaxExpression_1 = require("@appglue/common/dist/Expressions/Expressions/Math/MaxExpression");
const MultiplyExpression_1 = require("@appglue/common/dist/Expressions/Expressions/Math/MultiplyExpression");
const EqualExpression_1 = require("@appglue/common/dist/Expressions/Expressions/Math/EqualExpression");
const ModExpression_1 = require("@appglue/common/dist/Expressions/Expressions/Math/ModExpression");
const RoundExpression_1 = require("@appglue/common/dist/Expressions/Expressions/Math/RoundExpression");
const AverageExpression_1 = require("@appglue/common/dist/Expressions/Expressions/Math/AverageExpression");
const NotEqualExpression_1 = require("@appglue/common/dist/Expressions/Expressions/Math/NotEqualExpression");
const RandomExpression_1 = require("@appglue/common/dist/Expressions/Expressions/Math/RandomExpression");
const MinExpression_1 = require("@appglue/common/dist/Expressions/Expressions/Math/MinExpression");
const AddExpression_1 = require("@appglue/common/dist/Expressions/Expressions/Math/AddExpression");
const SubstractExpression_1 = require("@appglue/common/dist/Expressions/Expressions/Math/SubstractExpression");
const AsCurrencyExpression_1 = require("@appglue/common/dist/Expressions/Expressions/Math/AsCurrencyExpression");
const AbsoluteExpression_1 = require("@appglue/common/dist/Expressions/Expressions/Math/AbsoluteExpression");
const SumExpression_1 = require("@appglue/common/dist/Expressions/Expressions/Math/SumExpression");
const AsPercentageExpression_1 = require("@appglue/common/dist/Expressions/Expressions/Math/AsPercentageExpression");
const StoryData_1 = require("../../CommonUI/StoryBook/StoryData");
let expression;
let exp = new ExpressionConfiguration_1.ExpressionConfiguration();
exports.ExpressionMathStories = [
    new StoryData_1.StoryNode(() => {
        expression = new AbsoluteExpression_1.AbsoluteExpression();
        expression.value1.value = -1;
        let exp = new ExpressionConfiguration_1.ExpressionConfiguration();
        exp.expression = expression;
        return (0, jsx_runtime_1.jsx)(ExpressionBuilder_1.ExpressionBuilder, { expression: exp });
    }, "Expression Builder", "Math", "Absolute"),
    new StoryData_1.StoryNode(() => {
        expression = new AddExpression_1.AddExpression();
        expression.value1.value = -1;
        expression.value2.value = 10;
        exp = new ExpressionConfiguration_1.ExpressionConfiguration();
        exp.expression = expression;
        return (0, jsx_runtime_1.jsx)(ExpressionBuilder_1.ExpressionBuilder, { expression: exp });
    }, "Expression Builder", "Math", "Add"),
    new StoryData_1.StoryNode(() => {
        expression = new AsCurrencyExpression_1.AsCurrencyExpression();
        expression.value1.value = -1;
        exp = new ExpressionConfiguration_1.ExpressionConfiguration();
        exp.expression = expression;
        return (0, jsx_runtime_1.jsx)(ExpressionBuilder_1.ExpressionBuilder, { expression: exp });
    }, "Expression Builder", "Math", "As Currency"),
    new StoryData_1.StoryNode(() => {
        expression = new AsPercentageExpression_1.AsPercentageExpression();
        expression.value1.value = -1;
        exp = new ExpressionConfiguration_1.ExpressionConfiguration();
        exp.expression = expression;
        return (0, jsx_runtime_1.jsx)(ExpressionBuilder_1.ExpressionBuilder, { expression: exp });
    }, "Expression Builder", "Math", "As Percent"),
    new StoryData_1.StoryNode(() => {
        expression = new AverageExpression_1.AverageExpression();
        expression.value1.variableName = "numberList";
        exp = new ExpressionConfiguration_1.ExpressionConfiguration();
        exp.expression = expression;
        return (0, jsx_runtime_1.jsx)(ExpressionBuilder_1.ExpressionBuilder, { expression: exp });
    }, "Expression Builder", "Math", "Average"),
    new StoryData_1.StoryNode(() => {
        exp = (0, MathData_1.getDivideSimpleRule)();
        return (0, jsx_runtime_1.jsx)(ExpressionBuilder_1.ExpressionBuilder, { expression: exp });
    }, "Expression Builder", "Math", "Divide"),
    new StoryData_1.StoryNode(() => {
        expression = new EqualExpression_1.EqualExpression();
        expression.value1.variableName = "value1";
        expression.value2.variableName = "value2";
        exp = new ExpressionConfiguration_1.ExpressionConfiguration();
        exp.expression = expression;
        return (0, jsx_runtime_1.jsx)(ExpressionBuilder_1.ExpressionBuilder, { expression: exp });
    }, "Expression Builder", "Math", "Equal"),
    new StoryData_1.StoryNode(() => {
        expression = new MaxExpression_1.MaxExpression();
        expression.value1.variableName = "numberList";
        exp = new ExpressionConfiguration_1.ExpressionConfiguration();
        exp.expression = expression;
        return (0, jsx_runtime_1.jsx)(ExpressionBuilder_1.ExpressionBuilder, { expression: exp });
    }, "Expression Builder", "Math", "Max"),
    new StoryData_1.StoryNode(() => {
        expression = new MinExpression_1.MinExpression();
        expression.value1.variableName = "numberList";
        exp = new ExpressionConfiguration_1.ExpressionConfiguration();
        exp.expression = expression;
        return (0, jsx_runtime_1.jsx)(ExpressionBuilder_1.ExpressionBuilder, { expression: exp });
    }, "Expression Builder", "Math", "Min"),
    new StoryData_1.StoryNode(() => {
        expression = new ModExpression_1.ModExpression();
        expression.value1.variableName = "numberList";
        exp = new ExpressionConfiguration_1.ExpressionConfiguration();
        exp.expression = expression;
        return (0, jsx_runtime_1.jsx)(ExpressionBuilder_1.ExpressionBuilder, { expression: exp });
    }, "Expression Builder", "Math", "Mod"),
    new StoryData_1.StoryNode(() => {
        expression = new MultiplyExpression_1.MultiplyExpression();
        expression.value1.variableName = "value1";
        expression.value2.variableName = "value2";
        exp = new ExpressionConfiguration_1.ExpressionConfiguration();
        exp.expression = expression;
        return (0, jsx_runtime_1.jsx)(ExpressionBuilder_1.ExpressionBuilder, { expression: exp });
    }, "Expression Builder", "Math", "Multiply"),
    new StoryData_1.StoryNode(() => {
        expression = new NotEqualExpression_1.NotEqualExpression();
        expression.value1.variableName = "value1";
        expression.value2.variableName = "value2";
        exp = new ExpressionConfiguration_1.ExpressionConfiguration();
        exp.expression = expression;
        return (0, jsx_runtime_1.jsx)(ExpressionBuilder_1.ExpressionBuilder, { expression: exp });
    }, "Expression Builder", "Math", "Not Equal"),
    new StoryData_1.StoryNode(() => {
        expression = new RandomExpression_1.RandomExpression();
        exp = new ExpressionConfiguration_1.ExpressionConfiguration();
        exp.expression = expression;
        return (0, jsx_runtime_1.jsx)(ExpressionBuilder_1.ExpressionBuilder, { expression: exp });
    }, "Expression Builder", "Math", "Random"),
    new StoryData_1.StoryNode(() => {
        expression = new RoundExpression_1.RoundExpression();
        expression.value1.variableName = "value1";
        exp = new ExpressionConfiguration_1.ExpressionConfiguration();
        exp.expression = expression;
        return (0, jsx_runtime_1.jsx)(ExpressionBuilder_1.ExpressionBuilder, { expression: exp });
    }, "Expression Builder", "Math", "Round"),
    new StoryData_1.StoryNode(() => {
        expression = new SubstractExpression_1.SubstractExpression();
        expression.value1.variableName = "value1";
        exp = new ExpressionConfiguration_1.ExpressionConfiguration();
        exp.expression = expression;
        return (0, jsx_runtime_1.jsx)(ExpressionBuilder_1.ExpressionBuilder, { expression: exp });
    }, "Expression Builder", "Math", "Subtract"),
    new StoryData_1.StoryNode(() => {
        expression = new SumExpression_1.SumExpression();
        expression.value1.variableName = "numberList";
        exp = new ExpressionConfiguration_1.ExpressionConfiguration();
        exp.expression = expression;
        return (0, jsx_runtime_1.jsx)(ExpressionBuilder_1.ExpressionBuilder, { expression: exp });
    }, "Expression Builder", "Math", "Sum"),
];
//# sourceMappingURL=ExpressionMath-stories.js.map