import{template as e,makeStyleResponsive as r}from"@gem-sdk/core";let BoldSubscriptions=({setting:t,advanced:i})=>{let{widgetType:s,align:n,appBlockId:o}=t??{};return e`
    <div
      class="${i?.cssClass}"
      style="${{...r("ta",n)}}"
    >
      {% 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 '${o}' %}
            {% 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>
  `};export{BoldSubscriptions as default};
