<?php
    Theme::asset()->usePath()->add('leaflet-css', 'plugins/leaflet/leaflet.css');
    Theme::asset()->container('footer')->usePath()->add('leaflet-js', 'plugins/leaflet/leaflet.js');
    Theme::asset()->container('footer')->usePath()->add('markercluster-src-js', 'plugins/leaflet/leaflet.markercluster-src.js');
    Theme::asset()->container('footer')->usePath()->add('slider-js', 'js/company-detail.js');
    Theme::asset()->usePath()->add('css-bar-rating', 'plugins/jquery-bar-rating/themes/css-stars.css');
    Theme::asset()->container('footer')->usePath()->add('jquery-bar-rating-js', 'plugins/jquery-bar-rating/jquery.barrating.min.js');
    Theme::set('pageTitle', $company->name);

    $coverImage = '';

    if ($company->cover_image_url) {
        $coverImage = $company->cover_image_url;
    }
?>

<section class="section-box-2 company-detail">
    <?php if(is_plugin_active('ads')): ?>
        <?php echo apply_filters('ads_render', null, 'company_before', ['class' => 'my-2 text-center']); ?>

    <?php endif; ?>

    <div class="container">
        <div class="banner-hero banner-image-single">
            <div class="wrap-cover-image">
                <?php if($coverImage): ?>
                    <img src="<?php echo e($coverImage); ?>" alt="<?php echo e($company->name); ?>">
                <?php elseif(theme_option('default_company_cover_image')): ?>
                    <img src="<?php echo e(RvMedia::getImageUrl(theme_option('default_company_cover_image'))); ?>" alt="<?php echo e($company->name); ?>">
                <?php else: ?>
                    <img src="<?php echo e(Theme::asset()->url('imgs/backgrounds/cover-image-default.png')); ?>" alt="<?php echo e($company->name); ?>">
                <?php endif; ?>
            </div>
        </div>
        <div class="box-company-profile">
            <div class="image-company">
                <img src="<?php echo e($company->logo_thumb); ?>" class="img-fluid" alt="<?php echo e($company->name); ?>">
            </div>
            <div class="row mt-30">
                <div class="col-lg-8 col-md-12">
                    <h5 class="f-18">
                        <?php echo e($company->name); ?>

                        <span class="card-location font-regular ml-20"><?php echo e(implode(', ', array_filter([$company->state_name, $company->country_name]))); ?></span>
                    </h5>
                    <p class="mt-5 font-md color-text-paragraph-2 mb-15"><?php echo e($company->description); ?></p>
                </div>
                <div class="col-lg-4 col-md-12 text-lg-end">
                <?php if($company->phone): ?>
                    <a class="btn btn-call-icon btn-apply btn-apply-big" href="tel:<?php echo e($company->phone); ?>">
                        <?php echo e(__('Contact Us')); ?>

                    </a>
                <?php endif; ?>
                </div>
            </div>
        </div>
        <div class="border-bottom pt-10 pb-10"></div>
    </div>
</section>
<section class="section-box mt-50 company-detail-job-list">
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-md-12 col-sm-12 col-12">
                <div class="content-single">
                    <div class="tab-content">
                        <div class="tab-pane fade show active" id="tab-about" role="tabpanel" aria-labelledby="tab-about">
                            <h4><?php echo e(__('Welcome to :company_name', ['company_name' => $company->name])); ?></h4>
                            <div class="ck-content">
                                <?php echo BaseHelper::clean($company->content); ?>

                            </div>
                        </div>
                    </div>
                </div>

                <div class="box-related-job content-page box-list-jobs">
                    <?php echo $__env->make(Theme::getThemeNamespace('views.job-board.partials.company-job-items'), ['jobs' => $jobs], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                </div>

                <?php if(JobBoardHelper::isEnabledReview()): ?>
                    <div class="mt-4 pt-3 position-relative review-listing" style="<?php echo \Illuminate\Support\Arr::toCssStyles(['display: none' => $company->reviews_count < 1]) ?>">
                        <h6 class="fs-17 fw-semibold mb-3"><?php echo e(__(":company's Reviews", ['company' => $company->name])); ?></h6>
                        <div class="spinner-overflow"></div>
                        <div class="half-circle-spinner" style="display: none;position: absolute;top: 70%;left: 50%;">
                            <div class="circle circle-1"></div>
                            <div class="circle circle-2"></div>
                        </div>
                        <div class="review-list">
                            <?php echo $__env->make(Theme::getThemeNamespace('views.job-board.partials.review-load'), ['reviews' => $company->reviews], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                        </div>
                    </div>

                    <?php echo $__env->make(Theme::getThemeNamespace('views.job-board.partials.review-form'), [
                        'reviewable' => $company,
                        'canReview' => $canReview,
                    ], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                <?php endif; ?>
            </div>
            <div class="col-lg-4 col-md-12 col-sm-12 col-12 pl-40 pl-lg-15 mt-lg-30">
                <div class="sidebar-border">
                    <div class="sidebar-heading">
                        <div class="avatar-sidebar">
                            <div class="sidebar-info pl-0">
                                <span class="sidebar-company mb-2"><?php echo e($company->name); ?></span>
                                <?php if(JobBoardHelper::isEnabledReview()): ?>
                                    <?php echo Theme::partial('rating-star', ['star' => round($company->reviews_avg_star)]); ?>

                                    <span class="font-xs color-text-mutted ml-10">
                                        <span>(</span>
                                        <span><?php echo e($company->reviews_count); ?></span>
                                        <span>)</span>
                                    </span>
                                <?php endif; ?>
                                <span class="card-location"><?php echo e($company->location); ?></span>
                            </div>
                        </div>
                    </div>
                    <div class="sidebar-list-job">
                        <?php if($company->latitude && $company->longitude): ?>
                            <div class="box-map job-board-street-map-container">
                                <div class="job-board-street-map"
                                     data-popup-id="#street-map-popup-template"
                                     data-center="<?php echo e(json_encode([$company->latitude, $company->longitude])); ?>"
                                     data-map-icon="<?php echo e($company->name); ?>"
                                     style="height: 150px"
                                ></div>
                            </div>
                            <div class="d-none" id="street-map-popup-template">
                                <div>
                                    <table width="100%">
                                        <tr>
                                            <td width="40" class="image-company-sidebar">
                                                <div>
                                                    <img src="<?php echo e($company->logo_thumb); ?>" width="40" alt="<?php echo e($company->name); ?>">
                                                </div>
                                            </td>
                                            <td>
                                                <div class="infomarker">
                                                    <h5>
                                                        <a href="<?php echo e($company->url); ?>" target="_blank"><?php echo e($company->name); ?></a>
                                                    </h5>
                                                    <div class="text-info">
                                                        <i class="mdi mdi-account"></i>
                                                        <span><?php echo e(__(':number Employees', ['number' => $company->number_of_employees])); ?></span>
                                                    </div>
                                                    <?php if($company->full_address): ?>
                                                        <div class="text-muted">
                                                            <i class="uil uil-map"></i>
                                                            <span><?php echo e($company->full_address); ?></span>
                                                        </div>
                                                    <?php endif; ?>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        <?php endif; ?>
                    </div>
                    <div class="sidebar-list-job">
                        <ul>
                            <li>
                                <div class="sidebar-icon-item">
                                    <i class="fi-rr-clock"></i>
                                </div>
                                <div class="sidebar-text-info">
                                    <span class="text-description"><?php echo e(__('Year founded')); ?></span>
                                    <strong class="small-heading"><?php echo e($company->year_founded); ?></strong>
                                </div>
                            </li>
                            <?php if($company->website): ?>
                                <li>
                                    <div class="sidebar-icon-item"><i class="fi-rr-globe"></i></div>
                                    <div class="sidebar-text-info">
                                        <span class="text-description"><?php echo e(__('Website')); ?>

                                        </span>
                                        <a href="<?php echo e($company->website); ?>">
                                            <strong class="small-heading"><?php echo e(rtrim($company->website, '/')); ?></strong>
                                        </a>
                                    </div>
                                </li>
                            <?php endif; ?>
                            <?php if(count($jobs) > 0): ?>
                                <li>
                                    <div class="sidebar-icon-item">
                                        <i class="fi-rr-time-fast"></i>
                                    </div>
                                    <div class="sidebar-text-info">
                                        <span class="text-description"><?php echo e(__('Last Jobs Posted')); ?></span>
                                        <strong class="small-heading"><?php echo e($jobs->first()->created_at->diffForHumans()); ?></strong>
                                    </div>
                                </li>
                            <?php endif; ?>
                        </ul>
                    </div>
                    <div class="sidebar-list-job">
                        <ul class="ul-disc">
                            <?php if($uniqueId = $company->unique_id): ?>
                                <li><?php echo e(__('ID: :id', ['id' => $uniqueId])); ?></li>
                            <?php endif; ?>

                            <?php if($company->address): ?>
                                <li><?php echo e($company->address); ?></li>
                            <?php endif; ?>
                            <?php if($company->phone): ?>
                                <li><?php echo e(__('Phone: :phone', ['phone' => $company->phone])); ?></li>
                            <?php endif; ?>
                            <?php if($company->email): ?>
                                <li><?php echo e(__('Email: :email', ['email' => $company->email])); ?></li>
                            <?php endif; ?>

                        </ul>
                        <div class="text-center mt-30">
                            <?php if($company->facebook): ?>
                                <a href="<?php echo e($company->facebook); ?>" class="share-facebook social-share-link"></a>
                            <?php endif; ?>
                            <?php if($company->twitter): ?>
                                <a href="<?php echo e($company->twitter); ?>" class="share-twitter social-share-link"></a>
                            <?php endif; ?>
                            <?php if($company->linkedin): ?>
                                <a href="<?php echo e($company->linkedin); ?>" class="share-linkedin social-share-link"></a>
                            <?php endif; ?>
                            <?php if($company->instagram): ?>
                                <a href="<?php echo e($company->instagram); ?>" class="share-instagram social-share-link"></a>
                            <?php endif; ?>
                        </div>

                        <div class="mt-30">
                            <?php if($company->email): ?>
                                <a class="btn btn-send-message" href="mailto:<?php echo e($company->email); ?>"><?php echo e(__('Send Message')); ?></a>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
                <?php if(is_plugin_active('ads')): ?>
                    <?php echo apply_filters('ads_render', null, 'company_sidebar_before', ['class' => 'my-2 text-center']); ?>

                <?php endif; ?>

                <?php echo dynamic_sidebar('company_sidebar'); ?>


                <?php if(is_plugin_active('ads')): ?>
                    <?php echo apply_filters('ads_render', null, 'company_sidebar_after', ['class' => 'my-2 text-center']); ?>

                <?php endif; ?>
            </div>
        </div>
    </div>

    <?php echo Form::open(['url' => $company->url, 'method' => 'GET', 'id' => 'job-pagination-form']); ?>

    <input type="hidden" name="page" value="<?php echo e(BaseHelper::stringify(request()->query('page')) ?: 1); ?>">
    <?php echo Form::close(); ?>


    <?php if(is_plugin_active('ads')): ?>
        <?php echo apply_filters('ads_render', null, 'company_after', ['class' => 'my-2 text-center']); ?>

    <?php endif; ?>
</section>
<?php /**PATH /home/icloudcsin/public_html/tngamechanger/platform/themes/jobbox/views/job-board/company.blade.php ENDPATH**/ ?>