let t=t=>{let n={"main-widget":a(t),carousel:d(t),"full-page":i(t),"visual-gallery":r(t),"wall-photos":o(t),"site-badge":l(t),"badge-single":u(t),"badge-double":u(t),"badge-ribbon":u(t),"product-rating":c(t),"instagram-feed":p(t),"checkout-reviews":g(t),"single-highlight":$(t),"top-rated":s(t),"star-rating-badge":e()},y=t?.widgetType??"main-widget";return n[y]},a=t=>{let{limitQuestions:a="1",mainWidgetAnimation:e=!1,offset:d=150,mobileOffset:i=150,excludeTags:r="",includeTags:o="",search:l="",linkify:$=!0}=t??{};return`
    <div id="stamped-main-widget"
      data-product-id="{{ product.id }}"
      data-name="{{ product.title | escape }}"
      data-url="{{ shop.url }}{{ product.url }}"
      data-image-url="{{ product.featured_image | product_img_url: "large" |replace: '?', '%3F' | replace: '&','%26'}}"
      data-description="{{ product.description | escape }}"
      data-product-sku="{{product.handle}}"
      data-product-type="{{product.type}}"
      data-offset="${d}"
      data-search="${l}"
      data-linkify="${$}"
      data-tags-include="${o}"
      data-tags-exclude="${r}"
      data-offset-mobile="${i}"
      data-take-questions="${a}"
      data-animation="${e}">
    </div>
  `},e=()=>`
  <span 
    class="stamped-product-reviews-badge" 
    data-id="{{ product.id }}"
    data-product-sku="{{ product.handle }}" 
    data-product-type="{{product.type}}" 
    data-product-title="{{product.title}}" 
    style="display:block;">
  </span>
  `,d=t=>{let{widgetType:a,carouselTitle:e="",autoSlide:d=!1,autoSlideInterval:i="",limitResults:r="",titleColor:o="",starColor:l="",textColor:$="",linkColor:s=""}=t??{};return`
    <div id="stamped-reviews-widget"
      data-take="${r}"
      data-title="${e}"
      data-auto-play="${d}"
      data-style-color-star="${l}"
      data-style-color-text="${$}"
      data-style-color-link="${s}"
      data-style-color-title="${o}"
      data-widget-type="${a}"
      data-auto-play-speed="${i}"
      ${n(t)}>
    </div>
  `},i=t=>{let{widgetType:a,showProductImage:e=!1,limitResults:d="",starColor:i="",verifiedColor:r="",textColor:o="",linkColor:l=""}=t??{};return`
    <div id="stamped-reviews-widget"
      data-take="${d}"
      data-widget-type="${a}"
      data-style-color-star="${i}"
      data-style-color-text="${o}"
      data-style-color-link="${l}"
      data-product-image="${e}"
      data-style-color-verified="${r}"
      ${n(t)}>
    </div>
  `},r=t=>{let{widgetType:a,visualGalleryType:e="feed",carouselHeight:d="",autoSlide:i=!1,autoSlideInterval:r="",starColor:o="",hoverColor:l="",hoverOpacity:$=""}=t??{};return`
    <div id="stamped-reviews-widget"
      data-auto-play="${i}"
      data-widget-type="${a}"
      data-height="${d}"
      data-feed-type="${e}"
      data-style-color-star="${o}"
      data-style-color-hover="${l}"
      data-auto-play-speed="${r}"
      data-style-color-hover-opacity="${$?.split("%")[0]}"
      ${n(t)}>
    </div>
  `},o=t=>{let{widgetType:a,starColor:e=""}=t??{};return`
    <div id="stamped-reviews-widget"
      data-widget-type="${a}"
      data-color-stars="${e}"
      ${n(t)}>
    </div>
  `},l=t=>{let{widgetType:a,siteBadgeType:e="badge",badgeOuterColor:d="",badgeInnerColor:i="",badgeRibbonColor:r="",textColor:o="",starColor:l="",siteBadgeText:$="",siteBadgeHeight:s="",siteBadgeTextSize:p=""}=t??{};return`
    <div id="stamped-reviews-widget"
      data-widget-type="${a}"
      data-badge-type="${e}"
      data-color-outer="${d}"
      data-color-inner="${i}"
      data-color-ribbon="${r}"
      data-color-text="${o}"
      data-color-stars="${l}"
      data-title="${$}"
      data-title-size="${p}"
      data-height="${s}"
      ${n(t)}>
    </div>
  `},$=t=>`
    <div id="stamped-reviews-widget"
      ${n(t)}>
    </div>
  `,s=t=>{let{widgetType:a,starColor:e="",linkColor:d=""}=t??{};return`
    <div id="stamped-reviews-widget"
      data-widget-type="${a}
      data-color-link="${d}"
      data-color-stars="${e}">
    </div>
  `},p=t=>{let{widgetType:a,instagramFeedType:e="",autoSlide:d=!1,autoSlideInterval:i="",carouselHeight:r="",limitResults:o="",hoverOpacity:l="",hoverColor:$=""}=t??{};return`
    <div id="stamped-reviews-widget"
      data-widget-type="${a}"
      data-feed-type="${e}"
      data-height="${r}"
      data-auto-play="${d}"
      data-auto-play-speed="${i}"
      data-color-hover="${$}"
      data-color-hover-opacity="${l}"
      data-take="${o}"
      ${n(t)}>
    </div>
  `},g=t=>{let{widgetType:a,productIds:e="",checkoutReviewsStyle:d="box",checkoutReviewsTitle:i="",timeAgo:r=!1,textColor:o="",linkColor:l=""}=t??{};return`
    <div id="stamped-reviews-widget"
      data-widget-type="${a}"
      data-product-ids="${e}"
      data-style="${d}"
      data-title="${i}"
      data-color-text="${o}"
      data-color-link="${l}"
      data-timeago="${r}">
    </div>
  `},c=t=>{let{publicKey:a="",storeHash:e="",productId:d="",imageWidth:i="",imageHeight:r=""}=t??{},o=`https://stamped.io/inc/image/badges.png?apikey=${a}&sId=${e}&productId=${d}`;return`<img src="${o}" width="${i}" height="${r}">`},u=t=>{let{widgetType:a,publicKey:e="",storeHash:d="",labelFront:i="",labelBack:r="",imageWidth:o="",imageHeight:l=""}=t??{},$=`https://stamped.io/inc/image/badges.png?apikey=${e}&sId=${d}&type=${{"badge-single":"badge1","badge-double":"badge2","badge-ribbon":"badge3"}[a]}&label1=${i}&label2=${r}`;return`<img src="${$}" width="${o}" height="${l}">`},n=t=>{let{reviewIds:a="",productIds:e="",productType:d="",productVendor:i="",tags:r="",limitWords:o="",minimumRating:l="",minimumCharacters:$="",fillEmpty:s=!1,random:p=!1,withPhotos:g=!1}=t??{};return`
    data-product-tags="${r}"
    data-fill-random="${p}"
    data-review-ids="${a}"
    data-fill-empty="${s}"
    data-with-photos="${g}"
    data-product-ids="${e}"
    data-limit-words="${o}"
    data-min-rating="${l}"
    data-min-length="${$}"
    data-product-brand="${i}"
    data-product-category="${d}"
  `};export{t as getTemplateByWidget};
