<?php

if (!class_exists('Aimo_Header')) {

    class Aimo_Header
    {
        public function getHeader()
        {
            
            $header_layout = (int)aimo()->get_opt('header_layout'); 
            $header_layout_sticky = (int)aimo()->get_opt('header_layout_sticky'); 
            if(is_singular('product')) {
                $header_layout = (int)aimo()->get_theme_opt('header_layout_product', $header_layout ); 
            }
            if ($header_layout <= 0 || !class_exists('Pxltheme_Core') || !is_callable( 'Elementor\Plugin::instance' )) {
                get_template_part( 'template-parts/header/default');
            } else {
                $args = [
                    'header_layout' => $header_layout,
                    'header_layout_sticky' => $header_layout_sticky
                ];
                get_template_part( 'template-parts/header/elementor','', $args );
            } 
             
        }
 
    }
}
