{% include 'header.twig' %}

	{% if user['auth'] %}
	<!-- Main variables *content* -->

          <div class="appContent">
        
	   {% else %}
		<!-- Main variables *content* -->

          <div   id="notAuthed">
        <style>
    #notAuthed {
    padding: 150px 0px 50px 0px;
}
</style>
          <div class="appContent">
        {% endif %}

<section class="pt-4">
        <div class="container-fluid">
            <div class="card card-border">
            <div class="card-body p-3">

                <div class="row align-items-center">
                    <div class="col-md-auto col-12">
                        <div class="dropdown">
                            <button class="btn btn-secondary btn-sm btn-100 dropdown-toggle dd-btn" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
                                <div class="d-flex fw-400">
                                    <i class="ri-filter-2-line me-2"></i>
                                                                            Filter Services
                                                                            <span></span>
                                    <i class="ri-arrow-down-s-line ms-auto ms-md-3"></i>
                                </div>
                            </button>
                            <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1" style="max-height: 300px; overflow-y: auto;">
                            <a class="dropdown-item"  data-filter-category-id="All">All</a>{% for category in serviceCategory %}
                                             <a class="dropdown-item app-col mk-icons " href="services#" data-filter-category-id="{{ category["category_id"] }}" data-filter-category-name="{{ category["category_name"] }}">{{ category["category_name"] }}</a>{% endfor %}
                                        
															</ul>
						</div>
                    </div>
                                        <!-- ./col -->

                    <div class="col-lg">
                        <div class="search-services">
                            <div class="icon">
                                <i class="ri-search-line"></i>
                            </div>
                            <input type="text" class="textbox" name="query" id="filterServicesInput" placeholder=" Search in services.." data-search-service="#service-table"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<section class="pt-4">
        <div class="container-fluid">
            <div class="col-lg-12 col-md-12">
            <div class="services-head-row">
                <div class="si-wrapper">
                    <div class="service-item mb-4">
                        <div class="s-row s-title">
                            <div class="s-col s-col-sm">
                                ID
                            </div>
                            <div class="s-col s-title">
                                Service
                            </div>
                            <div class="s-col s-col-md">
                                Rate per 1000
                            </div>
                            <div class="s-col s-col-md">
                                Min order
                            </div>
                            <div class="s-col s-col-md">
                                Max order 
                            </div>
                                                        <div class="s-col s-col-lg">
                                Average time
                            </div>
                                                                                    <div class="s-col s-col-md">
                                Description
                            </div>
                                                    </div>
                    </div>
                </div>
            </div>
                                  
            

              {% for category in serviceCategory %}
                  <div class="category-card" data-category="{{ category["category_name"] }}">
                    <div class="si-header">
                    <h2 class="si-title">
                        						<strong  class=" si-title mk-icons" >{{ category["category_name"] }}️</strong>
                    </h2>
                </div>


                                                

                {% for service in category['services'] %}
                                                <div class="">
                    <div class="services-wrapper">
                        <div class="si-wrapper">
                            <div class="service-item">
                                <div class="s-row">
                                    <div class="s-col s-col-sm s-col-id">
                                        <span class="sp-serv-sm">
                                            {{ service["service_id"] }}
                                        </span>
                                    </div>
                                    <div class="s-col s-title">
                                        <span class="sp-serv-title" class="app-col mk-icons">
                                            {{ service["service_name"] }}
                                        </span>
                                    </div>
                                    <div class="s-col s-col-md s-col-c" data-title="Per 1000">
                                        <span class="sp-serv-sm">
                                                                                        
                      
{% if user["auth"] == "1" %} 
{{service["service_price"]}}

{% else %}
{{service["without_login_service_price"]}}
{% endif %}
                 
                                                                                    </span>
                                    </div>
                                    <div class="s-col s-col-md s-col-c" data-title="Min">
                                        <span class="orlc min">
                                            {{ service["service_min"] }}
                                        </span>
                                    </div>
                                    <div class="s-col s-col-md s-col-c" data-title="Max">
                                        <span class="sp-serv-sm">
                                            {{ service["service_max"] }}
                                        </span>
                                    </div>
                                                                            <div class="s-col s-col-lg s-col-avtime" data-title="Average Time">
                                            <span class="sp-serv-sm">
                                                {{ service["time"] }}
                                            </span>
                                        </div>
                     <!-- Modal -->
                     

                     
                     <div class="s-col s-col-md s-col-btn">
                        <div class="modal fade" id="servis{{ service["service_id"] }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
                          <div class="modal-dialog modal-dialog-centered" role="document">
                            <div class="modal-content">
                              <div class="modal-header">
                                <h5 class="serviceModalTitle: " id="exampleModalLabel" >{{ service["service_name"] }} </h5> 
                              </div>
                              <div class="modal-body text-left">
                                <p class="detail-data details-split-959"> {{ service["service_description"] }}</p>
                              </div>
                              <div class="modal-footer">
                                <button type="button" class="btn btn-actions" data-dismiss="modal">Close</button>
                              </div>
                            </div>
                          </div>
						  
                        </div><a href="javascript:void(0)" class="btn btn-primary btn-rounded btn-100 btn-sm " data-toggle="modal" data-target="#servis{{ service["service_id"] }}">
                         View
                      </a>
                      </div>
                            </div>
                            <!-- ./service-item -->
                        </div>
                        <!-- ### si-wrapper -->
                    </div>
                    <!-- ### services-wrapper -->
                </div>
                   
                        </td>

                  </tr>
                {% endfor %}
              {% endfor %}

          </tbody>
        </table>
      </div>
    </div>
  </div>
</div></div>
</div>
</div></div></div>


{% if contentText2 %}
{{ contentText2 }}
{% endif %}







<script>
function ikon(opt) {
    var ikon = "";
    if (opt.indexOf("Instagram") >= 0) {
        ikon = "<span class=\"fs-ig\"><i class=\"fab fa-instagram\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("YouTube") >= 0) {
        ikon = "<span class=\"fs-yt\"><i class=\"fab fa-youtube\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Facebook") >= 0) {
        ikon = "<span class=\"fs-fb\"><i class=\"fab fa-facebook-square\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Youtube") >= 0) {
        ikon = "<span class=\"fs-yt\"><i class=\"fab fa-youtube\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Twitter") >= 0) {
        ikon = "<span class=\"fs-tw\"><i class=\"fab fa-twitter\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Google") >= 0) {
        ikon = "<span class=\"fs-gp\"><i class=\"fab fa-google-plus\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Swarm") >= 0) {
        ikon = "<span class=\"fs-fsq\"><i class=\"fab fa-forumbee\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Dailymotion") >= 0) {
        ikon = "<span class=\"fs-dm\"><i class=\"fab fa-hospital-o\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Soundcloud") >= 0) {
        ikon = "<span class=\"fs-sc\"><i class=\"fab fa-soundcloud\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Vine") >= 0) {
        ikon = "<span class=\"fs-vn\"><i class=\"fab fa-vine\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Spotify") >= 0) {
        ikon = "<span class=\"fs-sp\"><i class=\"fab fa-spotify\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Snapchat") >= 0) {
        ikon = "<span class=\"fs-snap\"><i class=\"fab fa-snapchat-ghost\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Pinterest") >= 0) {
        ikon = "<span class=\"fs-pt\"><i class=\"fab fa-pinterest-p\" aria-hidden=\"true\"></i> </span>";

    } else if (opt.indexOf("Apple") >= 0) {
        ikon = "<span class=\"fs-apple\"><i class=\"fab fa-apple\" aria-hidden=\"true\"></i> </span>";

    } else if (opt.indexOf("M端zik") >= 0) {
        ikon = "<span class=\"fs-music\"><i class=\"fab fa-music\" aria-hidden=\"true\"></i> </span>";

    } else if (opt.indexOf("Vimeo") >= 0) {
        ikon = "<span class=\"fs-videmo\"><i class=\"fab fa-vimeo\" aria-hidden=\"true\"></i> </span>";

    } else if (opt.indexOf("Periscope") >= 0) {
        ikon = "<span class=\"fs-peri\"><i class=\"fab fa-periscope\" aria-hidden=\"true\"></i> </span>";

    } else if (opt.indexOf("Telegram") >= 0) {
        ikon = "<span class=\"fs-telegram\"><i class=\"fab fa-telegram-plane\" aria-hidden=\"true\"></i> </span>";

    }else if (opt.indexOf("Mix Servisler") >= 0) {
        ikon = "<span class=\"fs-mag\"><i class=\"fas fa-magic\" aria-hidden=\"true\"></i> </span>";

    }else if (opt.indexOf("Twitch") >= 0) {
        ikon = "<span class=\"fs-twc\"><i class=\"fab fa-twitch\" aria-hidden=\"true\"></i> </span>";

    } else if (opt.indexOf("Zomato") >= 0) {
        ikon = "<span class=\"fs-zom\"><i class=\"fab fa-cutlery\" aria-hidden=\"true\"></i> </span>";
 } else if (opt.indexOf("Amazon") >= 0) {
        ikon = "<span class=\"fs-amaz\"><i class=\"fab fa-amazon\" aria-hidden=\"true\"></i> </span>";
   } else if (opt.indexOf("Tumblr") >= 0) {
        ikon = "<span class=\"fs-tumb\"><i class=\"fab fa-tumblr\" aria-hidden=\"true\"></i> </span>";
  
   } else if (opt.indexOf("Yandex") >= 0) {
        ikon = "<span class=\"fs-yndx\"><i class=\"fab fa-yoast\" aria-hidden=\"true\"></i> </span>";
  
  } else if (opt.indexOf("LinkedIn") >= 0) {
        ikon = "<span class=\"fs-lnk\"><i class=\"fab fa-linkedin-in\" aria-hidden=\"true\"></i> </span>";
  
  } else if (opt.indexOf("Trendyol") >= 0) {
        ikon = "<span class=\"fs-trnd\"><i class=\"fas fa-tag\" aria-hidden=\"true\"></i> </span>";
  
  } else if (opt.indexOf("Clubhouse") >= 0) {
        ikon = "<span class=\"fs-club\"><i class=\"fas fa-camera-home\" aria-hidden=\"true\"></i> </span>";
  
  } else if (opt.indexOf("Discord") >= 0) {
        ikon = "<span class=\"fs-discord\"><i class=\"fab fa-discord\" aria-hidden=\"true\"></i> </span>";
  
    } else if (opt.indexOf("Onlyfans") >= 0) {
        ikon = "<span class=\"fs-ofans\"><i class=\"far fa-lock-alt\" aria-hidden=\"true\"></i> </span>";
        
    } else if (opt.indexOf("TikTok") >= 0) {
        ikon = "<span class=\"fs-tiktok\"><i class=\"fab fa-tiktok\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Tiktok") >= 0) {
        ikon = "<span class=\"fs-tiktok\"><i class=\"fab fa-tiktok\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Threads") >= 0) {
        ikon = "<span class=\"fs-threads\"><i class=\"fas fa-at\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Whatsapp") >= 0) {
        ikon = "<span class=\"fs-whatsapp \"><i class=\"fab fa-whatsapp\" aria-hidden=\"true\"></i> </span>";
    } else {
        ikon = "<span class=\"\"><i class=\"far fa-star\" aria-hidden=\"true\"></i> </span>  ";
    }
    return ikon;
}
  

$(document).ready(function() {

    
    $(".mk-icons").each(function() {
                var ico = ikon($(this).text());
                $(this).html(ico + $(this).text() );
                console.log($(this).text());
        }); 
    
      
        
        
        
        //console.log(ico);
        //console.log($(".mk-icon").html());
       // $("#mk-icon").html(ico );
});



</script>






{% include 'footer.twig' %}
