"use strict";var e=require("@gem-sdk/core"),a=require("../../types.js");const t=a=>{let t=e.template`class="gp-flex gp-items-center" style="${{...e.makeStyleResponsive("jc",a?.align)}}"`;switch(a?.widgetType){case"productReviews":return`<div ${t} data-fera-container="${a?.productReviewsCode}" data-product_id="{{ product.id }}"></div>`;case"testimonialCarousel":return`<div ${t} data-fera-container="${a?.testimonialCarouselCode}"></div>`;case"allReviews":return`<div ${t} data-fera-container="${a?.allReviewsCode}"></div>`;case"averageStoreRatingBadge":return`<div ${t} data-fera-container="${a?.averageStoreRatingBadgeCode}"></div>`;case"inStoreMedia":return`<div ${t} data-fera-container="${a?.inStoreMediaCode}"></div>`;case"averageRatingBadge":return`<div ${t} data-fera-container="${a?.averageRatingBadgeCode}" data-product_id="{{ product.id }}"></div>`;case"productPageMedia":return`<div ${t} data-fera-container="${a?.productPageMediaCode}" data-product_id="{{ product.id }}"></div>`}return""},r=a=>{let t=e.template`class="gp-flex gp-items-center" style="${{...e.makeStyleResponsive("jc",a?.align)}}"`;switch(a?.widgetTypeV3){case"productReviews":return`<div ${t} class="gp-flex gp-items-center" data-fera-container="product_reviews" data-product-id="{{ product.id }}"></div>`;case"testimonialCarousel":return`<div ${t} data-fera-widget="testimonial_carousel"></div>`;case"allReviews":return`<div ${t} data-fera-container="all_reviews"></div>`;case"mediaGallery":return`<div ${t} data-fera-container="store_customer_media"></div>`;case"productCollectionRating":return'<div data-fera-widget="product_collection_rating" data-rating-count="{{ product.metafields.reviews.rating_count }}" data-rating-average="{{ product.metafields.reviews.rating.value }}" data-product-id="{{ product.id }}"></div>';case"productDetailRating":return`<div ${t} data-fera-container="product_reviews_summary" data-product-id="{{ product.id }}"></div>`;case"otherWidget":return`${a?.otherWidgetCode}`}return""};exports.getTemplateByWidget=e=>e?.feraVersion===a.FERA_VERSION.V3?r(e):t(e);
