<?php (defined('BASEPATH')) OR exit('No direct script access allowed');

class Cookie extends CI_Controller
{
    public function __construct() 
    {
        parent::__construct();
        
        $this->load->helper('cookie');
    }
    
    public function index(){
        dd("teste");
    }
    
    private function aceita_cookie(){
        
        //delete_cookie('aceita_cookie'); 
        
        //return false;
        
        if((get_cookie('aceita_cookie')??'') != 'aceito'){
            
            Assets::add_module_css('cookie', array(
                'style'
            ));
            Assets::add_module_js('cookie', array(
                'script'
            ));
            Template::set_modal([],[
                'cookie/views/cookie_view'
            ]);
        }
    }
}