import BackgroundBasic from "./BackgroundBasic";
import BackgroundBasicRender from "./BackgroundBasicRender";
import getBackgroundPattern from "./getBackgroundPattern";

// スタイルシートのパス
import "./style.scss";

export { BackgroundBasic, BackgroundBasicRender, getBackgroundPattern };

/**
 * 背景設定の属性定義
 * ブロックのblock.jsonに追加するための属性定義
 */
export const backgroundBasicAttributes = {
  // 背景色設定
  backgroundColorPC: {
    type: "string",
    default: "#ff0033",
  },
  backgroundColorSP: {
    type: "string",
    default: "#ff0033",
  },
  backgroundColorOpacityPC: {
    type: "number",
    default: 1,
  },
  backgroundColorOpacitySP: {
    type: "number",
    default: 1,
  },
  backgroundColorMixBlendModePC: {
    type: "string",
    default: "normal",
  },
  backgroundColorMixBlendModeSP: {
    type: "string",
    default: "normal",
  },
  useGradientBackgroundPC: {
    type: "boolean",
    default: false,
  },
  useGradientBackgroundSP: {
    type: "boolean",
    default: false,
  },
  backgroundGradientPC: {
    type: "string",
  },
  backgroundGradientSP: {
    type: "string",
  },

  // 背景画像設定
  backgroundImagePC: {
    type: "string",
  },
  backgroundImageSP: {
    type: "string",
  },
  backgroundImagePositionPC: {
    type: "string",
    default: "50% 50%",
  },
  backgroundImagePositionSP: {
    type: "string",
    default: "50% 50%",
  },
  backgroundImageSizePC: {
    type: "string",
    default: "cover",
  },
  backgroundImageSizeSP: {
    type: "string",
    default: "cover",
  },
  backgroundImageRepeatPC: {
    type: "string",
    default: "no-repeat",
  },
  backgroundImageRepeatSP: {
    type: "string",
    default: "no-repeat",
  },
  backgroundImageCustomWidthPC: {
    type: "string",
    default: "500",
  },
  backgroundImageCustomWidthSP: {
    type: "string",
    default: "500",
  },
  backgroundImageCustomHeightPC: {
    type: "string",
    default: "300",
  },
  backgroundImageCustomHeightSP: {
    type: "string",
    default: "300",
  },
  backgroundImageCustomWidthUnitPC: {
    type: "string",
    default: "px",
  },
  backgroundImageCustomWidthUnitSP: {
    type: "string",
    default: "px",
  },
  backgroundImageCustomHeightUnitPC: {
    type: "string",
    default: "px",
  },
  backgroundImageCustomHeightUnitSP: {
    type: "string",
    default: "px",
  },
  backgroundImageCustomWidthAutoPC: {
    type: "boolean",
    default: false,
  },
  backgroundImageCustomWidthAutoSP: {
    type: "boolean",
    default: false,
  },
  backgroundImageCustomHeightAutoPC: {
    type: "boolean",
    default: false,
  },
  backgroundImageCustomHeightAutoSP: {
    type: "boolean",
    default: false,
  },

  // 背景パターン設定
  backgroundPatternTypePC: {
    type: "string",
    default: "none",
  },
  backgroundPatternTypeSP: {
    type: "string",
    default: "none",
  },
  backgroundPatternColorPC: {
    type: "string",
    default: "#000000",
  },
  backgroundPatternColorSP: {
    type: "string",
    default: "#000000",
  },
  backgroundPatternOpacityPC: {
    type: "number",
    default: 0.1,
  },
  backgroundPatternOpacitySP: {
    type: "number",
    default: 0.1,
  },
  backgroundPatternSizePC: {
    type: "number",
    default: 20,
  },
  backgroundPatternSizeSP: {
    type: "number",
    default: 20,
  },
  backgroundPatternSizeUnitPC: {
    type: "string",
    default: "px",
  },
  backgroundPatternSizeUnitSP: {
    type: "string",
    default: "px",
  },
  backgroundPatternRotatePC: {
    type: "number",
    default: 0,
  },
  backgroundPatternRotateSP: {
    type: "number",
    default: 0,
  },
};

export default {
  BackgroundBasic,
  BackgroundBasicRender,
  getBackgroundPattern,
  backgroundBasicAttributes,
};
