<turbo-stream action="append" target="image-container"><template>
  <script data-turbo-temporary="true">
    (function() {
      // Wait for carousel controller to reconnect after turbo stream updates
      setTimeout(function() {
        // Find the element with ONLY carousel controller (not carousel-sync)
        const carouselElement = document.querySelector('[data-controller="carousel"]');

        if (carouselElement) {
          const controller = Stimulus.getControllerForElementAndIdentifier(carouselElement, 'carousel');

          if (controller) {
            const currentIndex = controller.currentIndex;

              // 2D mode is ON - move to slide 1 (2D plan) if not already there
              if (currentIndex !== 1) {
                carouselElement.dispatchEvent(new CustomEvent('carousel:goto', { detail: { index: 1 } }));
              }
          } else {
            console.error('Carousel controller not found');
          }
        } else {
          console.error('Carousel element not found');
        }

        // Remove this script tag after execution
        document.currentScript?.remove();
      }, 100);
    })();
  </script>
</template></turbo-stream>
<turbo-stream action="remove" target="property-description"></turbo-stream>

<turbo-stream action="replace" target="parameter-container-qub"><template>
  <div class="flex flex-col gap-3" id="parameter-container-qub">
  <div class="hidden lg:block">
      <div class="flex flex-col justify-between items-center lg:items-start gap-2">
      <a data-turbo="false" class="flex text-sm" href="/en/customise_qubs">&lt; back</a>
    <div class="flex text-3xl">
            qub 70
    </div>
      <div>
        70 m2
      </div>
      <div class="border-t-2 border-b-2 py-2 border-light_green w-full">
        <div class="flex w-full items-center justify-center lg:justify-start gap-4">
          <a data-turbo-stream="true" class="px-4 py-1 bg-light_green text-green border-0 rounded-3xl hover:bg-green hover:text-white transition-colors" href="/en/customise_qubs/toggle_2d_plan">
            <div>3D Plan</div>
</a>
            <a data-turbo-stream="true" class="px-4 py-1 bg-light_green text-green border-0 rounded-3xl hover:bg-green hover:text-white transition-colors" href="/en/customise_qubs/toggle_features">
              <div>Features</div>
</a>        </div>
      </div>
  </div>
  </div>


</div>
</template></turbo-stream>