<?php
declare(strict_types=1);
use iTz\V7\Kernel;
if(!function_exists('itz_v7')){function itz_v7(): ?Kernel{return Kernel::instance();}}
if(!function_exists('itz_event')){function itz_event(string $event,array $payload=[],string $actorType='system',?string $actorId=null): ?int{return Kernel::instance()?->emit($event,$payload,$actorType,$actorId);}}
if(!function_exists('itz_metric')){function itz_metric(string $name,float $value=1,array $tags=[]): void{Kernel::instance()?->metric($name,$value,$tags);}}
if(!function_exists('itz_feature')){function itz_feature(string $key,bool $default=false,?string $subjectId=null): bool{return Kernel::instance()?->feature($key,$default,$subjectId)??$default;}}
if(!function_exists('itz_audit')){function itz_audit(string $cat,string $action,?string $target=null,array $meta=[]): void{Kernel::instance()?->audit($cat,$action,$target,$meta);}}
