<!-- _testimonial-ba-item.liquid -->
<div class="hdt-tetimonials-item hdt-slider__slide" timeline {{ block.shopify_attributes }}>
  <div class="hdt-testimonial-inner hdt-flex hdt-flex-col hdt-justify-{{ section.settings.content_align }}">
    <div class="hdt-col-wrap hdt-testimonial-info hdt-flex hdt-flex-col hdt-text-{{ section.settings.content_align }} hdt-align-{{ section.settings.content_align }}">
      {%- if section.settings.section_bf_af -%}
        {%- if block.settings.heading != blank -%}
          <div class="hdt-testimonial-heading-item">
            <span class="hdt-testi-head-style2 hdt-s-text hdt-h5">
              {{ block.settings.heading }}
            </span>
          </div>
        {%- endif -%}
        <div class="hdt-poropost-image">
          <svg xmlns="http://www.w3.org/2000/svg" width="46" height="31" viewBox="0 0 46 31" fill="none">
            <path d="M32.4413 30.5L37.8204 19.9545L38.1913 19.2273H37.375H26.375V0.5H45.5V19.6071L39.9438 30.5H32.4413ZM6.56633 30.5L11.9454 19.9545L12.3163 19.2273H11.5H0.5V0.5H19.625V19.6071L14.0688 30.5H6.56633Z" stroke="#B5B5B5"/>
            </svg>
        </div>
      {%- else -%}
      {%- if section.settings.image_width == 'one_img_style2' -%}
        {%- if block.settings.heading != blank -%}
          <div class="hdt-testimonial-heading-item">
            <span class="hdt-testi-head-style2 hdt-s-text hdt-h4">
              {{ block.settings.heading }}
            </span>
          </div>
        {%- endif -%}
      {%- endif -%}
      <div class="hdt-poropost-image">
        <svg xmlns="http://www.w3.org/2000/svg" width="46" height="31" viewBox="0 0 46 31" fill="none">
          <path d="M32.4413 30.5L37.8204 19.9545L38.1913 19.2273H37.375H26.375V0.5H45.5V19.6071L39.9438 30.5H32.4413ZM6.56633 30.5L11.9454 19.9545L12.3163 19.2273H11.5H0.5V0.5H19.625V19.6071L14.0688 30.5H6.56633Z" stroke="#B5B5B5"/>
          </svg>
      </div>
      {%- if section.settings.image_width != 'one_img_style2' -%}
        {%- if block.settings.heading != blank -%}
          <div class="hdt-testimonial-heading-item">
            <span class="hdt-testi-head hdt-s-text hdt-text-xl hdt-font-semibold">
              {{ block.settings.heading }}
            </span>
          </div>
        {%- endif -%}
      {%- endif -%}
      {%- endif -%}
      <div class="hdt-testimonial-rating hdt-flex hdt-justify-{{ section.settings.content_align }}">
        {%- render 'rating_star', rating: block.settings.rating -%}
      </div>
      {%- if block.settings.content != blank -%}
        <div class="hdt-testimonial-content {{ section.settings.font_size_content }} hdt-s-text hdt-rte {{ block.settings.font_size_content }}">
            {{ block.settings.content }}
        </div>
      {%- endif -%}
        <div class="hdt-metas">
          <div class="hdt-testimonial-author">
            {%- if block.settings.author != blank -%}
              <p class="hdt-testimonial-name hdt-text-base hdt-font-semibold hdt-s-text">
                {{ block.settings.author }}
              </p>
            {%- endif -%} 
            {%- if block.settings.pos != blank -%}
              <p class="hdt-testimonial-metas hdt-text-base hdt-s-text2">
                {{ block.settings.pos }}
                </p>
            {%- endif -%}
          </div>
          {%- liquid 
            assign product = block.settings.product
            assign pr_url = product.url
            -%}
          {%- if product != blank -%}
            <div class="hdt-testimonial-product hdt-row-flex hdt-align-center hdt-relative hdt-justify-{{ section.settings.content_align }}">
              <div class="hdt-content-wrap">
                <a href="{{ pr_url }}" class="hdt-testimonial-pr-title hdt-text-base hdt-font-semibold"><span class="hdt-font-normal">{{ 'sections.testimonials.purchase' | t }}</span> {{ product.title }}</a>
              </div>
            </div>
          {%- endif -%}
        </div>
    </div>
  </div>
</div>


{% schema %}
{
  "name": "Testimonial Item",
  "tag": null,
  "settings": [
    {
      "type": "text",
      "id": "heading",
      "label": "t:sections.testimonials.blocks.settings.heading.label"
    },
    {
      "type": "richtext",
      "id": "content",
      "label": "t:sections.testimonials.blocks.settings.content.label",
      "default": "<p>I am so happy to find a web fashion site that offers a great selection of stylish and affordable plus size clothing.</p>"
    },
    {
      "type": "text",
      "id": "author",
      "label": "t:sections.testimonials.blocks.settings.author.label",
      "default": "Author's name"
    },
    {
      "type": "product",
      "id": "product",
      "label": "t:sections.testimonials.blocks.settings.product.label",
    },
    {
      "type": "range",
      "id": "rating",
      "min": 2,
      "max": 5,
      "step": 1,
      "label": "t:sections.testimonials.blocks.settings.rating.label",
      "default": 5
    }
  ],
  "presets": [
    {
      "name": "Testimonial Item"
    }
  ]
}
{% endschema %}