<?php

use Bookingor\Frontend\Controller\Service\ServiceControlFront;
// Exit if accessed directly
if (! defined('ABSPATH')) exit; ?>
<div class="bookingor-col-12 bookingor-col-sm-12 bookingor-col-md-12 bookingor-col-lg-12 bookingor-col-xl-8 main d-flex j-width flex-column ">
    <div class="card-body">
        <div class="main-services ">
            <div class="main_top d-md-flex align-items-center justify-content-between pd-serv-header">
                <div class="to-searchs">
                    <div id="the-location-search">
                        <input type="text" class="form-control" id="searchLocation" placeholder="Search <?php echo esc_attr(get_option('bookingor_settings_location_name')); ?>">
                    </div>
                    <div id="the-services-search">
                        <input type="text" class="form-control" id="searchService-1" placeholder="Search Service">
                        <div id="n-close" class="search-sugg-services  pad-all-l flw-set ">
                            <div id="sugg-show-all">
                                <div class="search-serv">
                                    <div class="sug-1">
                                        <?php
                                        foreach (ServiceControlFront::$f_service_all as $key => $value) {
                                        ?>
                                            <span class="dropdown-item s-label widget-location" data-get-service-id="<?php echo esc_attr($value->service_id); ?>"><?php echo esc_html($value->service_name); ?></span>
                                        <?php } ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="left d-flex align-items-center justify-content-end">
                    <div class="btn-group">
                        <button type="button" class="left d-flex align-items-center dropdown bookingor-btn dropdown-toggle" type="button" id="dropdownMenuClickableInside" data-bs-toggle="dropdown" data-bs-auto-close="outside" aria-expanded="false">
                            Filter
                        </button>
                        <ul class="price-abs-menu dropdown-menu dropdown-menu-end" aria-labelledby="dropdownMenuClickableInside">
                            <div id="slider-range"></div>
                            <div class="price-inputs d-flex align-items-center justify-content-between">
                                <div>
                                    <label for="min"><?php esc_html_e("min", "bookingor"); ?></label>
                                    <span><?php echo esc_html(get_option("bookingor_settings_currency_symbol")); ?></span><input type="number" min="0" name="" class="form-control" id="minPrice">
                                </div>
                                <div>
                                    <label for="max"><?php esc_html_e("max", "bookingor"); ?></label>
                                    <span><?php echo esc_html(get_option("bookingor_settings_currency_symbol")); ?></span><input type="number" name="" min="0" class="form-control" id="maxPrice">
                                </div>
                            </div>
                            <div id="applyBtn"><?php esc_html_e("apply", "bookingor"); ?></div>
                        </ul>
                    </div>
                    <div class="view_icons d-flex align-items-center">
                        <img id="gridView" src="<?php echo  esc_url(plugin_dir_url(dirname(dirname(__FILE__))) . '../assets/images/design-svg/grid-view.svg'); ?> " alt="">
                        <img id="listView" src="<?php echo esc_url(plugin_dir_url(dirname(dirname(__FILE__))) . '../assets/images/design-svg/list-view.svg'); ?>" alt="">
                    </div>
                </div>
            </div>
            <div class="select">
                <div class="d-flex align-items-center justify-content-between">
                    <div class="full-head-1 pd-l-o"><?php esc_html_e("Services", "bookingor"); ?></div>
                    <div id="serviceWarning" class="align-items-center justify-content-center">
                        <span class="select_warning d-flex align-items-center d-none justify-content-center">
                            Select a service</span>
                        <span class="blank_wraing d-none"><?php esc_html_e("No Services Try another", "bookingor"); ?></span>
                    </div>
                </div>
                <div id="selectService-2" class="select-list-1 ">
                    <ul class="main-carousel all-services-shw row ">
                        <?php foreach (ServiceControlFront::$f_service_all as $key => $value) {  ?>
                            <li data-get-category-id="<?php echo esc_attr($value->category_get_id); ?>" data-repeat-status="<?php echo esc_attr($value->recurring_status); ?>" data-repeat-type="<?php echo  esc_attr($value->recurring_type); ?>" data-service-id="<?php echo esc_attr($value->service_id); ?>" data-get-service-price="<?php echo esc_attr($value->service_cost); ?>" data-get-duration="<?php echo esc_attr($value->service_duration); ?>" name="service_get_id" class="full-service-2  get_all_data  select_list">
                                <div class="list-f-srvs">
                                    <div class="f-service-image">
                                        <img class="serv-icon" src="<?php echo esc_url($value->service_icon ?  wp_get_attachment_url($value->service_icon) : $this->f_image_default);  ?>" alt="">
                                    </div>
                                    <div class="service-card-contents">
                                        <div class="service-heading-1"><?php echo esc_html($value->service_name);  ?></div>
                                    </div>
                                    <div class="service-price">
                                        <div class="<?php echo esc_html(get_option('bookingor_currency_position_change')); ?> d-flex">
                                            <div class="<?php echo esc_html(get_option('bookingor_currency_position_change')); ?>">
                                                <?php echo esc_html(get_option("bookingor_settings_currency_symbol")); ?>
                                            </div>
                                            <div><?php echo esc_html($value->service_cost); ?></div>
                                        </div>
                                    </div>
                                </div>
                            </li>
                        <?php } ?>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="main_footer main_botm d-md-flex align-items-center justify-content-end">
        <div class="d-flex justify-content-end">
            <button type="button" id="ctBtn" class="btn_orange bookingor-button bookingor-cont-btn"><?php echo esc_html(get_option("bookingor_settings_continue_button_text")); ?></button>
        </div>
    </div>
</div>