import { h } from "@stencil/core";
import scenario from "./sqm-coupon-code.feature";
import { CouponCodeView } from "./sqm-coupon-code-view";
export default {
  title: "Components/Coupon Code",
  parameters: {
    scenario,
  },
};
const defaultProps = {
  tooltiptext: "Copied to Clipboard",
  copyString: "THANKSJANE125uv125",
  open: false,
  copyButtonLabel: "Copy Coupon",
  inputPlaceholderText: "CODE ERROR",
  couponCodeLabel: "Your coupon code:",
  error: false,
  buttonType: "primary",
};
export const CouponCode = () => {
  return h("sqm-coupon-code", { tooltiptext: "Copied to Clipboard" });
};
export const CouponCodeWithSecondaryButtonType = () => {
  return (h("sqm-coupon-code", { tooltiptext: "Copied to Clipboard", buttonType: "secondary", buttonStyle: "button-outside" }));
};
export const CustomTooltipText = () => {
  return h("sqm-coupon-code", { tooltiptext: "CUSTOM TOOLTIP TEXT" });
};
export const CustomTooltipDuration = () => {
  return (h("sqm-coupon-code", { tooltiplifespan: 5000, tooltiptext: "CUSTOM TOOLTIP TEXT" }));
};
export const TextAlignCenter = () => {
  return h("sqm-coupon-code", { textAlign: "center" });
};
export const TextAlignRight = () => {
  return h("sqm-coupon-code", { textAlign: "right" });
};
export const CopyButton = () => {
  return (h("sqm-coupon-code", Object.assign({}, defaultProps, { buttonStyle: "button-outside" })));
};
export const CopyButtonCustomLabel = () => {
  return (h("sqm-coupon-code", Object.assign({}, defaultProps, { buttonStyle: "button-outside", "copy-button-label": "test long custom label" })));
};
export const CopyButtonBelow = () => {
  return (h("sqm-coupon-code", Object.assign({}, defaultProps, { buttonStyle: "button-below" })));
};
export const CopyButtonBelowCustomLabel = () => {
  return (h("sqm-coupon-code", Object.assign({}, defaultProps, { buttonStyle: "button-below", "copy-button-label": "test long custom label" })));
};
export const Loading = () => {
  return h(CouponCodeView, Object.assign({}, defaultProps, { loading: true }));
};
export const CopyButtonLoading = () => {
  return (h(CouponCodeView, Object.assign({}, defaultProps, { buttonStyle: "button-outside", loading: true })));
};
export const CopyButtonBelowLoading = () => {
  return (h(CouponCodeView, Object.assign({}, defaultProps, { buttonStyle: "button-below", loading: true })));
};
export const ErrorGeneric = () => {
  return (h(CouponCodeView, Object.assign({}, defaultProps, { errorType: "warning", error: true, errorText: "We couldn't fetch your code. Please try again later or reach out to the Support team for help resolving this issue." })));
};
export const ErrorPending = () => {
  return (h(CouponCodeView, Object.assign({}, defaultProps, { errorType: "info", error: true, errorText: "Your code will be available on April 24, 2023. Mark your calendar and come back then to redeem your reward!" })));
};
export const ErrorFullfillment = () => {
  return (h(CouponCodeView, Object.assign({}, defaultProps, { errorType: "warning", error: true, errorText: "We couldn't fetch your code. Please try again later or reach out to the Support team for help resolving this issue." })));
};
export const ErrorCancelled = () => {
  return (h(CouponCodeView, Object.assign({}, defaultProps, { errorType: "warning", error: true, errorText: "This code has been cancelled. Please reach out to the Support team for help resolving this issue." })));
};
export const ErrorExpired = () => {
  return (h(CouponCodeView, Object.assign({}, defaultProps, { errorType: "warning", error: true, errorText: "Looks like this code has expired. Please reach out to the Support team for help resolving this issue." })));
};
export const ErrorRedeemed = () => {
  return (h(CouponCodeView, Object.assign({}, defaultProps, { errorType: "success", error: true, errorText: "Looks like you\u2019ve already redeemed this code." })));
};
