<!DOCTYPE html>

<?php $page = 'home'; ?>
<html class="no-js" lang="pt-BR" xmlns:og="http://ogp.me/ns#">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>@yield('meta_title', 'Apoio')</title>

    <meta name="author" content="Apoio">
    <meta name="title" content="@yield('meta_title', 'Apoio - Líder em software de gestão de saúde')">
    <meta name="description" content="@yield('meta_description', 'A Apoio é 3ª maior empresa de TI do Brasil. Apoiamos organizações de Saúde desde a estruturação da gestão até a construção da cultura de inovação rumo à Saúde Digital')">

    <!-- CSRF Token -->
    <meta name="_token" content="{{ csrf_token() }}">

    <meta property="og:type" content="website">
    <meta property="og:url" content="">
    <meta property="og:title" content="@yield('meta_title', 'Apoio - Líder em software de gestão de saúde')">
    <meta property="og:description" content="@yield('meta_description', 'A Apoio é 3ª maior empresa de TI do Brasil. Apoiamos organizações de Saúde desde a estruturação da gestão até a construção da cultura de inovação rumo à Saúde Digital')">
    <meta property="og:image" content="@yield('meta_img', asset('assets/img/content/share.jpg'))">

    <link rel="stylesheet" href="{{asset('css/main.css')}}">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;600;700&display=swap" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Rubik:wght@400&display=swap" rel="stylesheet">

    <link rel="apple-touch-icon" sizes="180x180" href="{{asset('assets/img/favicons/apple-touch-icon.png')}}">
    <link rel="icon" type="image/png" sizes="32x32" href="{{asset('assets/img/favicons/favicon-32x32.png')}}">
    <link rel="icon" type="image/png" sizes="16x16" href="{{asset('assets/img/favicons/favicon-16x16.png')}}">
    <link rel="manifest" href="{{asset('assets/img/favicons/site.webmanifest')}}">
    <link rel="mask-icon" href="{{asset('assets/img/favicons/safari-pinned-tab.svg')}}" color="#4f8c81">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="theme-color" content="#ffffff">

    <!-- Google Tag Manager -->
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-MJZGRTC');</script>
    <!-- End Google Tag Manager -->

    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-56972242-1"></script>
    <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());

    gtag('config', 'UA-56972242-1');
    gtag('config', 'AW-974886700');
    gtag('config', 'UA-56972242-2');
    </script>

    <!-- Global site tag (gtag.js) - Google Ads: 974886700 -->
    {{-- <script async src="https://www.googletagmanager.com/gtag/js?id=AW-974886700"></script>
    <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());

    gtag('config', 'AW-974886700');
    </script> --}}

    <!-- Global site tag (gtag.js) - Google Analytics -->
    {{-- <script async src="https://www.googletagmanager.com/gtag/js?id=UA-56972242-2"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'UA-56972242-2');
    </script> --}}


    <script>
        document.documentElement.className = "js";
    </script>

    <script src='https://www.google.com/recaptcha/api.js'></script>
    <!--    Start of global snippet: Please do not remove
    Place this snippet between the <head> and </head> tags on every page of your site.
    -->
    <!-- Global site tag (gtag.js) - Google Marketing Platform -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=DC-11159898"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'DC-11159898');
    </script>
    <!-- End of global snippet: Please do not remove -->
    <script type="application/javascript">(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({'projectId':'10000','properties':{'pixelId':'10158516','userEmail': '<email_address>'}});var s=d.createElement(t);s.src=r;s.async=true;s.onload=s.onreadystatechange=function(){var y,rs=this.readyState,c=w[u];if(rs&&rs!="complete"&&rs!="loaded"){return}try{y=YAHOO.ywa.I13N.fireBeacon;w[u]=[];w[u].push=function(p){y([p])};y(c)}catch(e){}};var scr=d.getElementsByTagName(t)[0],par=scr.parentNode;par.insertBefore(s,scr)})(window,document,"script","https://s.yimg.com/wi/ytc.js","dotq");</script>
</head>

@php

    $url = explode("/", url()->current());
    $arrLocales = array('pt', 'en', 'es');
    $currentUrl = @$url[3];
    if (in_array(@$url[3], $arrLocales)) {
        $currentUrl = @$url[4];
    }
    $page = (@$currentUrl != '') ? $currentUrl : 'home';

@endphp
@php
$dark_header = false;

switch($page) {
    case 'segmento' : $template = 'template-002'; break;
    case 'solucao' : $template = 'template-003'; break;
    case 'produto' : $template = 'template-004'; break;
    case 'materiais-educativos' : $template = 'template-007'; break;
    case 'videos' : $template = 'template-007'; break;
    case 'blogs' : $template = 'template-005'; break;
    case 'blog' : $template = 'template-006'; break;
    case 'cases' : $template = 'template-0051'; break;
    case 'case' : $template = 'template-0061'; break;
    case 'about' : $template = 'template-011'; break;
    case 'page' : $template = 'template-010'; break;
    case 'contato' : $template = 'template-009'; break;
    case 'trabalhe-conosco' : $template = 'template-012'; break;
    default : $template = 'home'; break;
}

//echo $template;

if (
    $template == 'home' ||
    $template == 'template-002' ||
    $template == 'template-003' ||
    $template == 'template-004' ||
    $template == 'template-011'
) {
    $dark_header = true;
}
@endphp



<body class="@php
                if ($dark_header || $template == 'template-006') {
                    echo 'p-0';
                }
                if ($template == 'template-009' || $template == 'template-010') {
                    echo 'is-wildcard';
                }
                @endphp">
    <!-- Google Tag Manager (noscript) -->
    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MJZGRTC"
    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
    <!-- End Google Tag Manager (noscript) -->

    {{-- <script src="//cdn.pn.vg/sites/d114691b-3228-4a9d-a1f0-3fa8ca2ca7f5.js" async></script> --}}

    <header class="c-header js-header {{ ($dark_header) ? '--dark' : ''}} ">
        <div class="container">
            <div class="c-header__wrap">
                <a class="c-header__logo" href="{{ route('principal') }}">
                    @php $logo = ($dark_header) ? '-white' : '' @endphp
                    <img class="js-dropdown-logo" src="{{ asset('assets/img/layout/logo'.$logo.'.svg')}}" alt="Apoio">
                </a>
                <div class="c-header__actions">
                    <!-- Menu desktop -->
                    @include('site.partials.shared.menu.menu_desktop')
                    <!-- /Menu desktop -->
                    <!-- Phone header desktop -->
                    <div class="phone-desk-header {{ ($dark_header) ? '' : '--phone-light' }}">
                        <a href="#" data-toggle="modal" data-target="#modalCliente">Login do Usuário</a>
                        {{-- <span>Fale conosco</span> --}}
                    </div>
                    <!-- /Phone header desktop -->
                    <!-- /Language Switch -->
                    {{-- <a class="c-header__cta c-button {{ ($dark_header) ? '--secondary-light' : '--header-cta' }} js-header-cta d-none d-xl-block" href="#" data-toggle="modal" data-target="#modalCliente">{{ __('messages.menu-area_cliente') }}</a> --}}
                    <!-- Language Switch -->
                    {{-- <nav class="c-header__language js-language-toggle">
                        <div class="c-header__language-selected">
                            <span>
                                @switch(parseLocale())
                                    @case('pt')
                                        PT
                                        @break
                                    @case('en')
                                        EN
                                        @break
                                    @default
                                        PT
                                @endswitch
                            </span>
                        </div>
                        <div class="c-header__language-drop js-language-box">
                            <a href="/pt" class="c-header__language-drop__item"><span>PT</span></a>
                            <a href="/en" class="c-header__language-drop__item"><span>EN</span></a>
                        </div>
                    </nav> --}}
                    <!-- Button Menu mobile -->
                    <button class="c-header__button-menu d-xl-none js-menu-mobile-toggle" type="button" aria-label="Menu">
                        <span></span>
                    </button>
                    <!--/ Button Menu mobile -->
                </div>
            </div>
        </div>

        <!-- Submenus desktop -->
        @include('site.partials.shared.menu.submenu_desktop')
        <!-- /Submenus desktop -->
    </header>

    <!-- Menu mobile -->
    @include('site.partials.shared.menu.menu_mobile')
    <!-- /Menu mobile -->

@yield('body')

@include('site.partials.modal.fale_conosco')

<!--@include('site.partials.blocos.newsletter')-->

<!-- Footer desktop -->
@include('site.partials.shared.footer_desktop')
<!-- /Footer desktop -->

<!-- Footer mobile -->
@include('site.partials.shared.footer_mobile')
<!-- /Footer mobile -->


@include('site.partials.modal.cliente')
@include('site.partials.modal.cliente-esqueci-senha')


<div class="c-cookie-notice js-cookie-bar">
    <p>{{ __('messages.cookies-alert') }}
        @if (parseLocale() != 'en')
            <a href="{{route( 'site.pages', 'politica-de-cookies')}}">{{ __('messages.footer-politica') }}</a>
        @else
            <a href="{{route( 'site.pages', 'cookies-policy')}}">{{ __('messages.footer-politica') }}</a>
        @endif
    .</p>

    <button class="c-cookie-notice__btn js-accept-cookie" aria-label="Close">
        <svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10">
            <g fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-width="1.5">
                <path d="M5 0L5 10M10 5L0 5" transform="rotate(45 5 5)" />
            </g>
        </svg>
    </button>
</div>


<script>
    var SERVER_URL = "{{ URL::to('/') }}";
</script>

<script src="{{asset('js/main.js')}}"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="{{asset('js/site_forms.js')}}"></script>
<script src="{{asset('js/crypto-js/crypto-js.js')}}"></script>
{{-- <script>
    $(function(){
        $('form#formAreaCliente').on('submit', function(e){
            var form = $(this);

            if(form.hasClass('newPortal')) {
                e.preventDefault();
                var url = 'https://portalcliente.Apoio.com.br/portal/Apoiocli/api/login/token/integration';
                var login = form.find('input#login').val();
                var senha = form.find('input#senha').val();

                var login_hash = CryptoJS.AES.encrypt(login, 'poiuqwerlkjhasdf').toString();
                var senha_hash = CryptoJS.AES.encrypt(senha, 'poiuqwerlkjhasdf').toString();

                var data = {
                    codigoCliente: form.find('input#codigoCliente').val(),
                    login: login_hash,
                    password: senha_hash
                }

                $.ajax({
                    method: 'post',
                    url: url,
                    data: JSON.stringify(data),
                    dataType: 'json',
                    headers: {
                        'Access-Control-Allow-Origin': '*',
                        'Content-Type': 'application/json',
                        'Authorization': 'Basic ' + btoa(login+':'+senha)
                    },
                    success: function(resp){
                        console.log(resp);

                        if(resp.status && resp.tokenVerification) {
                            sessionStorage.setItem('dsMensagemInstalacao', resp.dsMensagemInstalacao);
                            sessionStorage.setItem('licence', resp.licence);
                            sessionStorage.setItem('licenseUpdate', resp.licenseUpdate);
                            sessionStorage.setItem('snExibeMensagemInstalacao', resp.snExibeMensagemInstalacao);
                            sessionStorage.setItem('snExibeChatbot', resp.snExibeChatbot);

                            window.location = 'https://portalcliente.Apoio.com.br/portal/integration/'+encodeURIComponent(resp.tokenVerification);
                        } else {
                            alert('Credenciais inválidas.');
                        }
                    }
                });
            }
        });
    });
</script> --}}

<script type="text/javascript" async src="https://d335luupugsy2.cloudfront.net/js/loader-scripts/1ffa0185-1aed-4470-ba6d-9d4c510ca86f-loader.js" ></script>
@if (parseLocale() != 'en')
    <!-- CHAT -->
    <!--Start of Tawk.to Script-->
    <script type="text/javascript">
        var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
        (function(){
        var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
        s1.async=true;
        s1.src='https://embed.tawk.to/5cd33e19d07d7e0c63929c50/default';
        s1.charset='UTF-8';
        s1.setAttribute('crossorigin','*');
        s0.parentNode.insertBefore(s1,s0);
        })();
    </script>
    <!--End of Tawk.to Script-->
@endif

    <script type="text/javascript">
        _linkedin_partner_id = "2305066";
        window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
        window._linkedin_data_partner_ids.push(_linkedin_partner_id);
        </script><script type="text/javascript">
        (function(l) {
        if (!l){window.lintrk = function(a,b){window.lintrk.q.push([a,b])};
        window.lintrk.q=[]}
        var s = document.getElementsByTagName("script")[0];
        var b = document.createElement("script");
        b.type = "text/javascript";b.async = true;
        b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js";
        s.parentNode.insertBefore(b, s);})(window.lintrk);
        </script>
        <noscript>
        <img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=2305066&fmt=gif" />
    </noscript>
</body>

</html>
