import * as React from "react";

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

import { EditorHeadline } from "./component";
import Headline from "./live";
import settings from "./settings";
import { themeSettings } from "@sc/plugins/webcomponents/v2/theme";

export default {
  title: "Plugins|Web Components/Exists/Headline",
  component: Headline,
  subcomponents: { EditorHeadline },
};

const style = {
  HEADLINE: {
    fontFamily: "Poppins",
    padding: 25,
    fontSize: "42pt",
    fontWeight: "bold",
    color: themeSettings.default.lightTextColor,
    lineHeight: "60px",
  },
};

export const Default: React.FC = () => {
  return (
    <Headline
      style={{
        ...style.HEADLINE,
        fontSize: "28pt",
        lineHeight: "28pt",
        color: themeSettings.default.darkTextColor,
        textAlign: "center",
      }}
    >
      What You'll Get When You Enroll
    </Headline>
  );
};

export const InTheEditor: React.FC = () => {
  return (
    <EditorWithCustomData
      content={[
        { id: "CustomField", parent: "u5j1r64m5rf", ...settings.default },
        ...sampleContentData,
      ]}
    />
  );
};
