"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core");exports.default=({setting:t,advanced:r})=>{let{widgetType:s,align:i,appBlockId:n}=t??{};return e.template`
    <div
      class="${r?.cssClass}"
      style="${{...e.makeStyleResponsive("ta",i)}}"
    >
      {% assign widget = '${s}' %}
      {% if widget == 'v1' %}
        <div class="ro_widget"></div>
      {% else %}
        {% assign app_blocks = section.blocks | where: "type", "@app" %}
        {% for block in app_blocks %}
          {% if block.type == '@app' and block.id contains '${n}' %}
            {% render block %}
          {% endif %}
        {% endfor %}
        <script>
          function renderPrices() {
            try {
              setTimeout(() => {
                if (BOLD && BOLD.BsubWidget) {
                  BOLD.BsubWidget._renderPrices();
                }
              }, 50);
            } catch (e) {
              console.error("Failed to render prices:", e);
            }
          }
          const events = ["gp:product-change-variant", "gp:product-change-quantity"];
          events.forEach(event => {
            window.removeEventListener(event, renderPrices);
            window.addEventListener(event, renderPrices);
          });
        </script>
      {% endif %}
    </div>
  `};
