


{% if user['auth'] %} 
{% include 'header.twig' %}
<div class="app-content">
        <!-- page-content -->
        <div class="container-fluid">

            <section class="services-list mt-4">
                <div class="d-card">
                    <div class="d-card-body p0">
						<div class="row"><div class="col-md-2 col-12">
								<div class="input-group-btn open">
								   <button type="button" class="btn btn-primary btn-block dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="padding: 0px; border-radius:5px;">Filter Services</button>
								   <ul class="dropdown-menu">
								     
									    <li><a onclick="javascript:filterService('All')">All Services</a></li>
									 {% for category in serviceCategory %}
									 <li><a onclick="javascript:filterService('{{ category["category_name"] }}')">{{ category["category_name"] }}</a></li>
								     {% endfor %}   
								</ul>
								</div>
							</div>
							<div class="col-md-10 col-12">
								<div class="services-search">
									<input type="text" id="serv-inp" class="ss-input" placeholder="Type the service you are looking for...">
								</div>
							</div>
							</div>
							<div class="dash-list mt-4">
                                <table id="serv-table" class="table results table-mobile-cards">
                                    <thead>
                                      <tr>
                                        <th>{{ lang['services.id'] }}</th>
                                        <th class="width-service-name">{{ lang['services.name'] }}</th>
                                        <th class="nowrap">{{ lang['services.price'] }}</th>
                                        <th class="nowrap">{{ lang['services.min'] }}</th>
                                        <th class="nowrap">{{ lang['services.max'] }}</th>
                                        <th class="nowrap">Description</th>
                                      </tr>
                                      </thead>
                                      <tbody>
              {% for category in serviceCategory %}
                  <tr class="services-header" data-category="ðŸ“Œ{{ category["category_name"] }}">
                                            <td colspan="7">
                                                <div class="services-title">
                                                    {{ category["category_name"] }}
                                                </div>
                                            </td>
                                        </tr>
                {% for service in category['services'] %}
                  <tr class="table-mobile-card serviceData" data-category=" {{ category["category_name"] }}">
                    <td >{{ service["service_id"] }}</td>
                    <td data-title="Service" class="pm-ikon">{{ service["service_name"] }}</td>
                    
                    <td>
                      {{ service["service_price"] }}
                    </td>
                    <td  data-title="Minimum" class="text-success">{{ service["service_min"] }}</td>
                    <td data-title="Maximum" class="text-danger">{{ service["service_max"] }}</td>
                     <td>
                        <!-- Modal -->
                        <div class="modal fade" id="service{{ service["service_id"] }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
                          <div class="modal-dialog" role="document">
                            <div class="modal-content">
                              <div class="modal-header">
                                <h5 class="modal-title" id="exampleModalLabel" style="color:white;font-weight:900;text-transform:uppercase;"> {{ service["service_name"] }} </h5> 
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                  <span aria-hidden="true">Ã—</span>
                                </button>
                              </div>
                              <div class="modal-body text-left">
                                <p class="detail-data details-split-959" style="overflow-x:scroll;">
              {{ service["service_description"] }}
              </p>
                              </div>
                              <div class="modal-footer">
															  <button type="button" class="btn btn-sm btn-danger" data-dismiss="modal" style="background:red;text-transform:uppercase;border-radius:9px;">Close</button>
															  <a href="/tickets" class="btn btn-sm btn-primary"style="text-transform:uppercase;border-radius:9px;">Help</a>
														  </div>
                            </div>
                          </div>
                        </div><a class="sDetayBtn" data-toggle="modal" data-target="#service{{ service["service_id"] }}">
                                                Detail
                                            </a>
                  
                        </td>
                  </tr>
                {% endfor %}
              {% endfor %}
                
          </tbody>
                                    </table>
                                    </div>
							
							
							</section>	</div>
							</div>
							
							
							<script>
      function filterService(category) {
        if (category == 'All')
          $('tbody tr.hidden').removeClass('hidden');
        else {
          $('tbody tr').addClass('hidden');
          $('tbody tr[data-category="' + category + '"]').removeClass('hidden');
        }
        removeEmptyCategory();
      }

      function removeEmptyCategory() {
        $('.services-header').each(function () {
            var next = $(this).next();
            var services = $(this).nextUntil('.services-header');
            var empty = true;
            services.each(function() {
              if (!$(this).hasClass('hidden')) empty = false;
            });
            if (empty) $(this).addClass('hidden');
        })
      }
</script>

{% else %}
  	
<!DOCTYPE html>
<html lang="en">
<head>
  <base href="{{ site['url'] }}/">
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>{{ title }}</title>
  <meta name="keywords" content="{{ site['keywords'] }}">
  <meta name="description" content="{{ site['description'] }}">
  {% if site['favicon'] %}
    <link rel="shortcut icon" type="image/ico" href="{{ site['favicon'] }}" />
  {% endif %}

  <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->


      <link rel="stylesheet" type="text/css" href="/public/msp/css/oxe27c6l4jba9ob6.css">
      <link rel="stylesheet" type="text/css" href="/public/msp/css/5uz6pcnizr47up6j.css">
      <link rel="stylesheet" type="text/css" href="/public/msp/css/bootstrap-datetimepicker.min.css">
      <link rel="stylesheet" type="text/css" href="/public/msp/css/all.min.css">
  	<!-- owl -->
	<link rel="stylesheet" type="text/css" href="https://templates.hibootstrap.com/bonsa/default/assets/css/owl.carousel.min.css">
	<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.2/umd/popper.min.js"></script> 
  <link rel="stylesheet" href="https://app.smmspot.net/smmspot.css?api_key=5a31f874a593de816b39e9aeeefd0d58">

<style>
  .site-name a {
    font-size: 22px;
    color: #fff;
    text-transform: uppercase;
    font-weight: 600;
    text-shadow: 1px 2px #73737378;
}
  </style>
</head>
  <body class="home-body">
  
      <div class="header">
         <div class="container m-flex">
            <div class="row" style="height: 99px;">
               <div class="col-auto align-self-center">
                  <div class="row">
                     <div class="col align-self-center">
                        <div class="site-name">
						<a href="/">
                                                     
                                      <img src="{{ site['logo'] }}" alt="Best Smm Panel | Cheapest Smm Panel | Smm Panel India - {{ site["site_name"] }}" class="logo-lg" title="Best Smm Panel | Cheapest Smm Panel | Smm Panel India - {{ site["site_name"] }}">
                          						</a>
                        </div>
                     </div>
                  </div>
               </div>
               <div class="col d-none d-lg-block">
                  <div class="head-menu">
                     <div class="row">
                        <div class="col text-lg-right mh-fullw">
                           <div class="header-menu">
                              <ul>
                                 <li class="active">
                                   <a href="/services">Service List</a>
                                 </li>
                                 <li>
                                   <a href="/api">API</a>
                                 </li>
                              </ul>
                           </div>
                        </div>
                        <div class="col-auto align-self-center mh-fullw">
                          <a href="/signup" class="btn btn-secondary">
                           <i class="fas fa-user mr-2"></i>
                           Register
                           </a>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
  
      <div class="app-navbar">
         <div class="row">
            <div class="col text-center align-self-center">
              <a href="/services">
                  <i class="fas fa-list-alt"></i>
                  <div class="navbar-texts">Service List</div>
               </a>
            </div>
            <div class="col text-center align-self-center">
              <a href="/signup">
                  <img src="https://cdn.mypanel.link/oewf4r/agu28f58jsad7elb.png" class="navbar-mid-icon" alt="">
                  <div class="navbar-texts"><strong>Sign Up</strong></div>
               </a>
            </div>
            <div class="col text-center align-self-center">
              <a href="/api">
                  <i class="fas fa-laptop-code"></i>
                  <div class="navbar-texts">API</div>
               </a>
            </div>
         </div>
      </div>

<!-- Main variables *content* -->
    <div class="home-head outside">
        <div class="home-head-bg"></div>
	
        <div class="home-head-content">
            <div class="container" style="position: relative;">
                <div class="row">
                </div>
            </div>
        </div>
    </div>

    <div class="hs-area mb-5">
        <div class="container">
            <section class="services-list mt-4">
                <div class="d-card">
                    <div class="d-card-body p0">
						<div class="row">
							<div class="col-md-2 col-12">
								<div class="input-group-btn open">
								   <button type="button" class="btn btn-primary btn-block dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="padding: 0px; border-radius:5px;">Filter Services</button>
								   <ul class="dropdown-menu">
								     
									    <li><a onclick="javascript:filterService('All')">All Services</a></li>
									 {% for category in serviceCategory %}
									 <li><a onclick="javascript:filterService('{{ category["category_name"] }}')">{{ category["category_name"] }}</a></li>
								     {% endfor %}   
								</ul>
								</div>
							</div>
							<div class="col-md-10 col-12">
								<div class="services-search">
									<input type="text" id="serv-inp" class="ss-input" placeholder="Type the service you are looking for.">
								</div>
							</div>
						</div>

                        <div class="dash-list mt-4">
                            <table id="serv-table" class="table results table-mobile-cards">
                                <thead>
                                    <tr>
                                        <th>ID</th>
                                        <th>Service</th>
                                        <th>Rate per 1000</th>
                                        <th>Min order</th>
                                        <th>Max order</th>
										                                        <th>Average time</th>
										                                        <th>Description</th>
                                    </tr>
                                </thead>
                                <tbody>
									{% for category in serviceCategory %}
                  <tr class="services-header" data-category="ðŸ“Œ{{ category["category_name"] }}">
                                            <td colspan="7">
                                                <div class="services-title">
                                                    {{ category["category_name"] }}
                                                </div>
                                            </td>
                                        </tr>
                {% for service in category['services'] %}
                  <tr class="table-mobile-card serviceData" data-category=" {{ category["category_name"] }}">
                    <td >{{ service["service_id"] }}</td>
                    <td data-title="Service" class="pm-ikon">{{ service["service_name"] }}</td>
                    
                    <td>
                      {{ service["service_price"] }}
                    </td>
                    <td  data-title="Minimum" class="text-success">{{ service["service_min"] }}</td>
                    <td data-title="Maximum" class="text-danger">{{ service["service_max"] }}</td>
                     <td>
                        <!-- Modal -->
                        <div class="modal fade" id="service{{ service["service_id"] }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
                          <div class="modal-dialog" role="document">
                            <div class="modal-content">
                              <div class="modal-header">
                                <h5 class="modal-title" id="exampleModalLabel" style="color:white;font-weight:900;text-transform:uppercase;"> {{ service["service_name"] }} </h5> 
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                  <span aria-hidden="true">Ã—</span>
                                </button>
                              </div>
                              <div class="modal-body text-left">
                                <p class="detail-data details-split-959" style="overflow-x:scroll;">
              {{ service["service_description"] }}
              </p>
                              </div>
                              <div class="modal-footer">
															  <button type="button" class="btn btn-sm btn-danger" data-dismiss="modal" style="background:red;text-transform:uppercase;border-radius:9px;">Close</button>
															  <a href="/tickets" class="btn btn-sm btn-primary"style="text-transform:uppercase;border-radius:9px;">Help</a>
														  </div>
                            </div>
                          </div>
                        </div><a class="sDetayBtn" data-toggle="modal" data-target="#service{{ service["service_id"] }}">
                                                Detail
                                            </a>
                  
                        </td>
                  </tr>
                {% endfor %}
              {% endfor %}
                
                                  	
									
                                </tbody>
                            </table>
                        </div><!-- dash-list -->
                    </div>
                </div>
            </section>
        </div>
	 </div>  

<script>
      function filterService(category) {
        if (category == 'All')
          $('tbody tr.hidden').removeClass('hidden');
        else {
          $('tbody tr').addClass('hidden');
          $('tbody tr[data-category="' + category + '"]').removeClass('hidden');
        }
        removeEmptyCategory();
      }

      function removeEmptyCategory() {
        $('.services-header').each(function () {
            var next = $(this).next();
            var services = $(this).nextUntil('.services-header');
            var empty = true;
            services.each(function() {
              if (!$(this).hasClass('hidden')) empty = false;
            });
            if (empty) $(this).addClass('hidden');
        })
      }
</script>





<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js"></script> 
  
</body>
  
</html>
  
      <script>
	if ($('.hs-area-owl').length) {
		$('.hs-area-owl').owlCarousel({
			loop:true,
			margin:25,
			nav:false,
			smartSpeed: 500,
			autoplay: 5000,
			responsive:{
				0:{
					items:1
				},
				600:{
					items:1
				},
				800:{
					items:1
				},
				1024:{
					items:2
				},
				1200:{
					items:3
				}
			}
		});    		
	}
      </script>
  
{% 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("Periscope") >= 0) {
        ikon = "<span class=\"fs-pc\"><i class=\"fab fa-map-marker\" 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-square\" 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("iTunes") >= 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("Ekşi") >= 0) {
        ikon = "<span class=\"fs-eksi\"><i class=\"fab fa-tint\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("Telegram") >= 0) {
        ikon = "<span class=\"fs-telegram\"><i class=\"fab fa-telegram\" 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-square\" 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\" aria-hidden=\"true\"></i> </span>";
	} else if (opt.indexOf("Yahoo") >= 0) {
        ikon = "<span class=\"fs-yahoo\"><i class=\"fab fa-yahoo\" aria-hidden=\"true\"></i> </span>";
    } else if (opt.indexOf("TikTok") >= 0) {
        ikon = "<span class=\"fs-tiktok\"><i class=\"fa fa-music\" aria-hidden=\"true\"></i> </span>";
    } else {
        ikon = "<span class=\"\"><i class=\"far fa-star\" aria-hidden=\"true\"></i> </span>  ";
    }
    return ikon;
}
  
$(document).ready(function() {

	$(".pm-ikon").each(function() {
				var ico = ikon($(this).text());
				$(this).html(ico + $(this).text() );
				console.log($(this).text());
		});	
});

</script>
{% include 'footer.twig' %}