import { Img, TopImg, TopSlider, TopVideo, Text, GhButton, WxAutoButton, Floatbutton, ITItemGhSpec, ITItemEnterpriseWxSpec, ImageText, ImageTextItem } from "../../req"

// 头部内容
export const topsliderContent: TopSlider = {
    elementType: 'TOP_SLIDER',
    imageUrlList: ["", "", ""],
    width: 800,
    height: 800,
    activeIndex: 0
}

export const topimgContent: TopImg = {
    elementType: 'TOP_IMAGE',
    imageUrl: '',
    width: 800,
    height: 800,
    adLocation: 'sns',
    outerStyle: 0
}

export const topvideoNewContent: TopVideo = {
    elementType: 'TOP_VIDEO',
    videoUrl: '',
    width: 640,
    height: 360,
    adLocation: 'sns',
    outerStyle: 0
}

// 悬浮组件
export const floatbuttonContent: Floatbutton = {
    elementType: 'FLOAT_BUTTON',
    titleColor: "#171717",
    descColor: "#4c4c4c",
    title: "",
    desc: "",
    styleType: 0,
    imageUrl: '',
    appearType: 0,
    disappearType: 0,
    componentItem: {
        elementType: 'GH',
        btnTitle: '关注公众号',
        fontColor: '#FFFFFF',
        btnBgColorTheme: '#07C160',
        btnFontType: 0,
        fastFollow: 1,
    }
}


// 悬浮组件 添加商家微信
export const floatbuttonBtTypeWxAuto: Omit<WxAutoButton, 'btnBorderColorTheme' | 'useIcon' | 'paddingTop' | 'paddingBottom'> = {
    elementType: 'ENTERPRISE_WX',
    btnBgColorTheme: "#07C160",
    btnFontType: 0,
    btnTitle: "联系商家",
    fontColor: "#FFFFFF",
}
export const floatbuttonBtTypeGh: Omit<GhButton, 'btnBorderColorTheme' | 'useIcon' | 'paddingTop' | 'paddingBottom'> = {
    elementType: 'GH',
    btnTitle: '关注公众号',
    fontColor: '#FFFFFF',
    btnBgColorTheme: '#07C160',
    btnFontType: 0,
    fastFollow: 1,
}

// 内容
export const imgContent: Img = {
    elementType: 'IMAGE',
    imageUrl: '',
    width: 750,
    height: 750,
    paddingTop: 0,
    paddingBottom: 0,
}

export const txtContent: Text = {
    elementType: 'TEXT',
    text: '',
    fontStyle: 0,
    textAlignment: 0,
    fontSize: 20,
    fontColor: '#595959',
    paddingTop: 22,
    paddingBottom: 22,
}

export const ghContent: GhButton = {
    elementType: 'GH',
    btnTitle: '关注公众号',
    fontColor: '#FFFFFF',
    btnBgColorTheme: '#07C160',
    btnBorderColorTheme: '#FFFFFF',
    btnFontType: 0,
    useIcon: 0,
    fastFollow: 1,
    paddingTop: 28,
    paddingBottom: 28,
}

// 添加商家微信
export const wxAutoContent: WxAutoButton = {
    elementType: 'ENTERPRISE_WX',
    btnBgColorTheme: "#07C160",
    btnBorderColorTheme: "#FFFFFF",
    btnFontType: 0,
    btnTitle: "联系商家",
    useIcon: 0,
    paddingTop: 28,
    paddingBottom: 28,
    fontColor: "#FFFFFF",
}

/** 图文复合组件 默认值 */
export const ghITItemContent: ITItemGhSpec = {
    btnTitle: '关注公众号',
    fontColor: '#FFFFFF',
    btnBgColorTheme: '#07C160',
    // btnBorderColorTheme: '#FFFFFF',
    btnFontType: 0,
    // useIcon: 0,
    fastFollow: 1,
    // paddingTop: 28,
    // paddingBottom: 28,
}

// 添加商家微信
export const wxAutoITItemContent: ITItemEnterpriseWxSpec = {
    btnBgColorTheme: "#07C160",
    // btnBorderColorTheme: "#FFFFFF",
    btnFontType: 0,
    btnTitle: "联系商家",
    // useIcon: 0,
    // paddingTop: 28,
    // paddingBottom: 28,
    fontColor: "#FFFFFF",
}

export const imageTextItem: Omit<ImageTextItem, 'content'> = {
    borderColor: '#e5e5e5',
    titleColor: '#353535',
    descColor: '#b2b2b2',
    bgColor: '#ffffff',
    jumpMode: 'btn_jump',
    imageUrl: '',
    title: '',
    desc: '',
    subElemType: 'GH'
}

export const imageTextGh: ImageText = {
    elementType: 'IMAGE_TEXT',
    paddingTop: 40,
    paddingBottom: 40,
    alignMode: 0,
    imageTextItem: [
        {
            ...imageTextItem,
            content: {
                ...ghITItemContent
            }
        }
    ]
}