import { h } from "@stencil/core";
import { QrCodeView } from "./sqm-qr-code-view";
export default {
  title: "Components/QR Code",
};
const defaultProps = {
  hideTitle: false,
  loading: false,
  alignment: "center",
  error: false,
  qrLink: "https://media.istockphoto.com/id/1251071788/vector/qr-code-bar-code-black-icon-digital-technology.jpg?s=612x612&w=0&k=20&c=maw4OqMSEegAdSo8Drm9HO7i1ddddvP2YaL1UuWbRig=",
  createDownloadable: async () => {
    console.log("Download QR Code clicked");
  },
  createPrintable: async () => {
    console.log("Print QR Code clicked");
  },
  titleText: "Share your QR code",
  downloadCodeText: "Download",
  printCodeText: "Print",
  errorHeaderText: "There was an error loading your QR code",
  errorDescriptionText: "Please refresh this page and try again",
};
export const Default = () => {
  return h(QrCodeView, Object.assign({}, defaultProps));
};
export const HideTitle = () => {
  return h(QrCodeView, Object.assign({}, defaultProps, { hideTitle: true }));
};
export const LeftAlign = () => {
  return h(QrCodeView, Object.assign({}, defaultProps, { alignment: "left" }));
};
export const CenterAlign = () => {
  return h(QrCodeView, Object.assign({}, defaultProps, { alignment: "center" }));
};
export const RightAlign = () => {
  return h(QrCodeView, Object.assign({}, defaultProps, { alignment: "right" }));
};
export const Loading = () => {
  return h(QrCodeView, Object.assign({}, defaultProps, { loading: true }));
};
export const Error = () => {
  return h(QrCodeView, Object.assign({}, defaultProps, { error: true }));
};
export const DownloadError = () => {
  return h(QrCodeView, Object.assign({}, defaultProps, { error: true }));
};
