{% verbatim %}

<script data-b2c-component-servico-pesquisa type="text/x-handlebars-template">

    <div class="box">
        <ul class="nav nav-tabs tabs-custom bs-adaptive-tabs">
            {{#each servicoTipoList }}
                <li {{#ifCond @index 0}}class="current"{{/ifCond}}>
                    <a rel="#tab-servico-{{this}}" href="javascript:void(0)">
                        <img onerror="BF.notFoundImagemSrc(this)" style="width: 21px;margin-bottom: 5px;" src="{{getTemplatePath}}/assets/images/svg/{{ this }}.svg">
                        <label>{{__ this}}</label>
                    </a>
                </li>
            {{/each}}
        </ul>

        <div class="tab-content-list">

            {{#each data }}
                <div class="tab-content {{servicoTipo}}" id="tab-servico-{{servicoTipo}}" {{#ifNotCond @index 0}}style="display:none;"{{/ifNotCond}}>
                    <div class="servico-list row">
                        {{#each servicoList}}
                            {{#ifNotCond servico.tarifa null}}
                                <div class="col-12 col-md-4 col-lg-4">
                                    <div class="servico-item" data-b2c-servico-item="{{base64_encode (concat servicoTipo "||#||" servico.keyServicoParametro)}}">
                                        <div class="img-card">
                                            <img onerror="BF.notFoundImagemSrc(this)" data-src="{{servico.media.urlImagemMedia}}" alt="">
                                        </div>
                                        <div class="descricao">
                                            <p>{{servico.nmServico}}</p>
                                            <a href="" class="button btn-descricao" data-toggle="modal" data-target=".modal-servico-{{@index}}-{{servicoTipo}}">{{__ 'verDetalhes'}}</a>

                                            {{#if servico.modalidadeList }}
                                                <select name="ingressoModalidade" data-b2c-input="ingressoModalidade">
                                                    <option value="">Selecione uma modalidade</option>
                                                    {{#each servico.modalidadeList}}
                                                        <option value="{{code}}">{{name}}</option>
                                                    {{/each}}
                                                </select>

                                                <select name="dtServico" data-b2c-input="dtServico" style="display:none">
                                                    <option value="">{{__ 'selecioneUmaData'}}</option>
                                                    {{#each data}}
                                                        <option value="{{formatTimestamp this "YYYYMMDD"}}">{{formatTimestamp this "DD/MM/YYYY"}}</option>
                                                    {{/each}}
                                                </select>
                                            {{/if }}
                                            {{#if data }}
                                                <select name="dtServico" data-b2c-input="dtServico">
                                                    <option value="">{{__ 'selecioneUmaData'}}</option>
                                                    {{#each data}}
                                                        <option value="{{formatTimestamp this "YYYYMMDD"}}">{{formatTimestamp this "DD/MM/YYYY"}}</option>
                                                    {{/each}}
                                                </select>
                                            {{/if}}


                                            {{#ifCond servico.stUnico true}}
                                                <div class="input-group" data-b2c-step-group="">
                                                    <span class="input-group-btn">
                                                        <button type="button"
                                                                class="btn"
                                                                data-b2c-step="decrement">
                                                            <i class="fas fa-minus"></i>
                                                        </button>
                                                    </span>
                                                    <input type="text" class="form-control input-number border"
                                                           readonly="readonly" value="1"  data-b2c-step-idx="{{base64_encode (concat servicoTipo "||#||" servico.keyServicoParametro)}}" data-b2c-step="input" data-b2c-step-min="1" data-b2c-step-max="20">
                                                    <span class="input-group-btn">
                                                        <button type="button"
                                                                class="btn"
                                                                data-b2c-step="increment">
                                                            <i class="fas fa-plus"></i>
                                                        </button>
                                                    </span>
                                                </div>
                                            {{/ifCond}}
                                            <div class="price-container">
                                                <span class="price">
                                                    {{#toMoedaTarifaHtml servico.tarifa}}
                                                        <span data-sg-moeda="{{sgMoeda}}" data-b2c-servico-item-price-uniq="{{value}}" data-b2c-servico-item-price>{{sgMoeda}} {{value}}</span>
                                                    {{/toMoedaTarifaHtml}}
                                                </span>
                                            </div>
                                            <a href="" class="button btn-adicionar" data-b2c-btn-servico-add data-b2c-text-adicionar="{{__ 'adicionar'}}" data-b2c-text-remover="{{__ 'remover'}}">{{__ 'adicionar'}}</a>
                                        </div>
                                    </div>
                                </div>
                                <div class="modal fade bd-example-modal-lg modal-servico-{{@index}}-{{servicoTipo}}" tabindex="-1" role="dialog" aria-labelledby="modal-servico-{{@index}}-{{servicoTipo}}" aria-hidden="true">
                                  <div class="modal-dialog modal-lg">
                                    <div class="modal-content">
                                      <div class="modal-header">
                                        <h5 class="modal-title">{{__ 'descricao'}}</h5>
                                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                          <span aria-hidden="true">&times;</span>
                                        </button>
                                      </div>
                                      <div class="modal-body">
                                        {{{servico.dsServico}}}
                                      </div>
                                      <div class="modal-footer">
                                        <button type="button" class="btn btn-secondary" data-dismiss="modal">{{__ 'fechar'}}</button>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                            {{/ifNotCond}}
                        {{/each}}
                    </div>
                </div>
            {{/each}}

        </div>
    </div>

</script>
{% endverbatim %}
