const GenContentFlex = (content, text = "0") => { return { type: "flex", altText: "GenContentFlex!" + text, contents: content, }; }; const flexs = { flex0: { type: "flex", altText: "this is a flex message", contents: { type: "bubble", body: { type: "box", layout: "vertical", contents: [ { type: "text", text: "hello", }, { type: "text", text: "world", }, ], }, }, }, flex1: GenContentFlex({ type: "bubble", body: { type: "box", layout: "vertical", contents: [ { type: "text", text: "hello", }, { type: "text", text: "world", }, ], }, }), bub1: GenContentFlex({ type: "bubble", direction: "ltr", header: { type: "box", layout: "vertical", contents: [ { type: "text", text: "Header", align: "center", contents: [], }, ], }, hero: { type: "image", url: "https://vos.line-scdn.net/bot-designer-template-images/bot-designer-icon.png", size: "full", aspectRatio: "1.51:1", aspectMode: "fit", }, body: { type: "box", layout: "vertical", contents: [ { type: "text", text: "Body", align: "center", contents: [], }, ], }, footer: { type: "box", layout: "horizontal", contents: [ { type: "button", action: { type: "uri", label: "Button", uri: "https://linecorp.com", }, }, ], }, }), bub2: GenContentFlex({ type: "bubble", hero: { type: "image", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/01_1_cafe.png", size: "full", aspectRatio: "20:13", aspectMode: "cover", action: { type: "uri", label: "Line", uri: "https://linecorp.com/", }, }, body: { type: "box", layout: "vertical", contents: [ { type: "text", text: "Brown Cafe", weight: "bold", size: "xl", contents: [], }, { type: "box", layout: "baseline", margin: "md", contents: [ { type: "icon", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png", size: "sm", }, { type: "icon", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png", size: "sm", }, { type: "icon", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png", size: "sm", }, { type: "icon", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png", size: "sm", }, { type: "icon", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gray_star_28.png", size: "sm", }, { type: "text", text: "4.0", size: "sm", color: "#999999", flex: 0, margin: "md", contents: [], }, ], }, { type: "box", layout: "vertical", spacing: "sm", margin: "lg", contents: [ { type: "box", layout: "baseline", spacing: "sm", contents: [ { type: "text", text: "Place", size: "sm", color: "#AAAAAA", flex: 1, contents: [], }, { type: "text", text: "Miraina Tower, 4-1-6 Shinjuku, Tokyo", size: "sm", color: "#666666", flex: 5, wrap: true, contents: [], }, ], }, { type: "box", layout: "baseline", spacing: "sm", contents: [ { type: "text", text: "Time", size: "sm", color: "#AAAAAA", flex: 1, contents: [], }, { type: "text", text: "10:00 - 23:00", size: "sm", color: "#666666", flex: 5, wrap: true, contents: [], }, ], }, ], }, ], }, footer: { type: "box", layout: "vertical", flex: 0, spacing: "sm", contents: [ { type: "button", action: { type: "uri", label: "CALL", uri: "https://linecorp.com", }, height: "sm", style: "link", }, { type: "button", action: { type: "uri", label: "WEBSITE", uri: "https://linecorp.com", }, height: "sm", style: "link", }, { type: "spacer", size: "sm", }, ], }, }), bub3: GenContentFlex({ type: "bubble", header: { type: "box", layout: "horizontal", contents: [ { type: "text", text: "NEWS DIGEST", weight: "bold", size: "sm", color: "#AAAAAA", contents: [], }, ], }, hero: { type: "image", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/01_4_news.png", size: "full", aspectRatio: "20:13", aspectMode: "cover", action: { type: "uri", label: "Action", uri: "https://linecorp.com/", }, }, body: { type: "box", layout: "horizontal", spacing: "md", contents: [ { type: "box", layout: "vertical", flex: 1, contents: [ { type: "image", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/02_1_news_thumbnail_1.png", gravity: "bottom", size: "sm", aspectRatio: "4:3", aspectMode: "cover", }, { type: "image", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/02_1_news_thumbnail_2.png", margin: "md", size: "sm", aspectRatio: "4:3", aspectMode: "cover", }, ], }, { type: "box", layout: "vertical", flex: 2, contents: [ { type: "text", text: "7 Things to Know for Today", size: "xs", flex: 1, gravity: "top", contents: [], }, { type: "separator", }, { type: "text", text: "Hay fever goes wild", size: "xs", flex: 2, gravity: "center", contents: [], }, { type: "separator", }, { type: "text", text: "LINE Pay Begins Barcode Payment Service", size: "xs", flex: 2, gravity: "center", contents: [], }, { type: "separator", }, { type: "text", text: "LINE Adds LINE Wallet", size: "xs", flex: 1, gravity: "bottom", contents: [], }, ], }, ], }, footer: { type: "box", layout: "horizontal", contents: [ { type: "button", action: { type: "uri", label: "More", uri: "https://linecorp.com", }, }, ], }, }), bub4: GenContentFlex({ type: "bubble", hero: { type: "image", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/01_2_restaurant.png", size: "full", aspectRatio: "20:13", aspectMode: "cover", action: { type: "uri", label: "Action", uri: "https://linecorp.com", }, }, body: { type: "box", layout: "vertical", spacing: "md", action: { type: "uri", label: "Action", uri: "https://linecorp.com", }, contents: [ { type: "text", text: "Brown's Burger", weight: "bold", size: "xl", contents: [], }, { type: "box", layout: "vertical", spacing: "sm", contents: [ { type: "box", layout: "baseline", contents: [ { type: "icon", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/restaurant_regular_32.png", }, { type: "text", text: "$10.5", weight: "bold", margin: "sm", contents: [], }, { type: "text", text: "400kcl", size: "sm", color: "#AAAAAA", align: "end", contents: [], }, ], }, { type: "box", layout: "baseline", contents: [ { type: "icon", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/restaurant_large_32.png", }, { type: "text", text: "$15.5", weight: "bold", flex: 0, margin: "sm", contents: [], }, { type: "text", text: "550kcl", size: "sm", color: "#AAAAAA", align: "end", contents: [], }, ], }, ], }, { type: "text", text: "Sauce, Onions, Pickles, Lettuce & Cheese", size: "xxs", color: "#AAAAAA", wrap: true, contents: [], }, ], }, footer: { type: "box", layout: "vertical", contents: [ { type: "spacer", size: "xxl", }, { type: "button", action: { type: "uri", label: "Add to Cart", uri: "https://linecorp.com", }, color: "#905C44", style: "primary", }, ], }, }), bub5: GenContentFlex({ type: "bubble", hero: { type: "image", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/01_3_movie.png", size: "full", aspectRatio: "20:13", aspectMode: "cover", action: { type: "uri", label: "Action", uri: "https://linecorp.com/", }, }, body: { type: "box", layout: "vertical", spacing: "md", contents: [ { type: "text", text: "BROWN'S ADVENTURE\nIN MOVIE", weight: "bold", size: "xl", gravity: "center", wrap: true, contents: [], }, { type: "box", layout: "baseline", margin: "md", contents: [ { type: "icon", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png", size: "sm", }, { type: "icon", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png", size: "sm", }, { type: "icon", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png", size: "sm", }, { type: "icon", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gold_star_28.png", size: "sm", }, { type: "icon", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/review_gray_star_28.png", size: "sm", }, { type: "text", text: "4.0", size: "sm", color: "#999999", flex: 0, margin: "md", contents: [], }, ], }, { type: "box", layout: "vertical", spacing: "sm", margin: "lg", contents: [ { type: "box", layout: "baseline", spacing: "sm", contents: [ { type: "text", text: "Date", size: "sm", color: "#AAAAAA", flex: 1, contents: [], }, { type: "text", text: "Monday 25, 9:00PM", size: "sm", color: "#666666", flex: 4, wrap: true, contents: [], }, ], }, { type: "box", layout: "baseline", spacing: "sm", contents: [ { type: "text", text: "Place", size: "sm", color: "#AAAAAA", flex: 1, contents: [], }, { type: "text", text: "7 Floor, No.3", size: "sm", color: "#666666", flex: 4, wrap: true, contents: [], }, ], }, { type: "box", layout: "baseline", spacing: "sm", contents: [ { type: "text", text: "Seats", size: "sm", color: "#AAAAAA", flex: 1, contents: [], }, { type: "text", text: "C Row, 18 Seat", size: "sm", color: "#666666", flex: 4, wrap: true, contents: [], }, ], }, ], }, { type: "box", layout: "vertical", margin: "xxl", contents: [ { type: "spacer", }, { type: "image", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/linecorp_code_withborder.png", size: "xl", aspectMode: "cover", }, { type: "text", text: "You can enter the theater by using this code instead of a ticket", size: "xs", color: "#AAAAAA", margin: "xxl", wrap: true, contents: [], }, ], }, ], }, }), bub6: GenContentFlex({ type: "bubble", hero: { type: "image", url: "https://scdn.line-apps.com/n/channel_devcenter/img/fx/01_5_carousel.png", size: "full", aspectRatio: "20:13", aspectMode: "cover", }, body: { type: "box", layout: "vertical", spacing: "sm", contents: [ { type: "text", text: "Arm Chair, White", weight: "bold", size: "xl", wrap: true, contents: [], }, { type: "box", layout: "baseline", contents: [ { type: "text", text: "$49", weight: "bold", size: "xl", flex: 0, wrap: true, contents: [], }, { type: "text", text: ".99", weight: "bold", size: "sm", flex: 0, wrap: true, contents: [], }, ], }, ], }, footer: { type: "box", layout: "vertical", spacing: "sm", contents: [ { type: "button", action: { type: "uri", label: "Add to Cart", uri: "https://linecorp.com", }, style: "primary", }, { type: "button", action: { type: "uri", label: "Add to wishlist", uri: "https://linecorp.com", }, }, ], }, }), }; module.exports = { GenContentFlex, flexs };