function genAdCard(ctx,option) {
  const { json5: vcard } = ctx;

  return {
    type: "flex",
    altText: "廣告卡片",
    contents: {
      type: "carousel",
      contents: [
        ctx.contents,
        {
            "type": "bubble",
            "size":"giga",
            "hero": {
                "type": "image",
                "url": option.ad_image,
                "size": "full",
                "aspectMode": "cover",
                "aspectRatio": "5:2",
                "action": {
                  "type": "uri",
                  "label": option.ad_title,
                  "uri": option.ad_link
                }
            },
            "body": {
                "type": "box",
                "layout": "vertical",
                "contents": [
                    {
                        "type": "text",
                        "text": option.ad_title,
                        "weight": "bold",
                        "size": "xl",
                        "color": "#333333"
                    },
                    {
                        "type": "text",
                        "text": option.ad_desc,
                        "color": "#666666",
                        "size": "md",
                        "wrap": true
                    }
                ]
            }
        }
      ]
    },
  };
}

export { genAdCard };