import * as React from "react";
import OrderSummary, { OrderSummaryTypes } from "./component";
import theme from "@sc/plugins/misc/v2/blocks/weblayouts/theme";

import settings from "./settings";
import {
  sampleContentData,
  EditorWithCustomData,
} from "@sc/modules/page/Builder/Builder.stories";

export default {
  title: "Plugins|Web Components/Moderate/Order Summary",
  component: OrderSummary,
};

export const Default: React.FC = () => {
  return (
    <OrderSummary
      cart={[
        {
          title: "10 Minute Funnels Premium Subscription",
          value: "FREE",
        },
        { title: "Shipping", value: 7.95 },
      ]}
      showHeader
      // showSubtotal
      showTotal
      style={{ marginTop: 40 }}
      type={OrderSummaryTypes.STANDARD}
    />
  );
};
export const InTheEditor: React.FC = () => {
  return (
    <EditorWithCustomData
      content={[
        { id: "CustomField", parent: "u5j1r64m5rf", ...settings.default },
        ...sampleContentData,
      ]}
    />
  );
};
