"use client";
import type { CSSProperties } from "react";
import "./loader.css";
export type BrandLoaderProps = { loading:boolean; fullscreen?:boolean; logoSrc:string; label?:string; className?:string };
/** A verification point visits the evidence chain and returns by the renewal route. Uses actual application readiness. */
export function BrandLoader({loading,fullscreen=true,logoSrc,label="Loading TrainingCertify",className=""}:BrandLoaderProps){
 if(!loading)return null;
 const style={"--brand-loader-primary":"#3157F6","--brand-loader-secondary":"#7B63F7","--brand-loader-ink":"#0B1120","--brand-loader-paper":"#F7F8FF","--brand-loader-mark-size":"70px","--brand-loader-mark-pos":"65.0px"} as CSSProperties;
 return <div className={["brand-loader",fullscreen?"brand-loader--fullscreen":"brand-loader--inline",className].join(" ")} style={style} role="status" aria-live="polite" aria-busy="true" data-brand={"TrainingCertify"}>
 <span className="brand-loader__stage" aria-hidden="true"><span className="brand-loader__scene" dangerouslySetInnerHTML={{__html:"<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"200\" height=\"200\" viewBox=\"0 0 1000 1000\" data-motion-profile=\"trainingcertify\" aria-hidden=\"true\"><defs><clipPath id=\"clear-trainingcertify\"><path clip-rule=\"evenodd\" d=\"M0 0H1000V1000H0Z M275 275V725H725V275Z\"/></clipPath></defs><g clip-path=\"url(#clear-trainingcertify)\"><g class=\"identity-grammar\"><circle cx=\"140\" cy=\"260\" r=\"42\" stroke=\"#7B63F7\" fill=\"none\" stroke-width=\"16\" stroke-linecap=\"round\" stroke-linejoin=\"round\" pathLength=\"1\" data-motif-key=\"training\" class=\"identity-stroke\" style=\"--phase:0.000s\"/><circle cx=\"500\" cy=\"260\" r=\"42\" stroke=\"#7B63F7\" fill=\"none\" stroke-width=\"16\" stroke-linecap=\"round\" stroke-linejoin=\"round\" pathLength=\"1\" data-motif-key=\"practice\" class=\"identity-stroke\" style=\"--phase:0.095s\"/><circle cx=\"860\" cy=\"260\" r=\"42\" stroke=\"#7B63F7\" fill=\"none\" stroke-width=\"16\" stroke-linecap=\"round\" stroke-linejoin=\"round\" pathLength=\"1\" data-motif-key=\"assessment\" class=\"identity-stroke\" style=\"--phase:0.190s\"/><circle cx=\"860\" cy=\"740\" r=\"42\" stroke=\"#7B63F7\" fill=\"none\" stroke-width=\"16\" stroke-linecap=\"round\" stroke-linejoin=\"round\" pathLength=\"1\" data-motif-key=\"evidence\" class=\"identity-stroke\" style=\"--phase:0.285s\"/><circle cx=\"500\" cy=\"740\" r=\"42\" stroke=\"#7B63F7\" fill=\"none\" stroke-width=\"16\" stroke-linecap=\"round\" stroke-linejoin=\"round\" pathLength=\"1\" data-motif-key=\"credential\" class=\"identity-stroke\" style=\"--phase:0.380s\"/><path d=\"M140 260H860V740H140V260\" stroke=\"#3157F6\" fill=\"none\" stroke-width=\"22\" stroke-linecap=\"round\" stroke-linejoin=\"round\" pathLength=\"1\" data-motif-key=\"qualification-route\" class=\"identity-stroke\" style=\"--phase:0.475s\"/><circle cx=\"140\" cy=\"740\" r=\"42\" stroke=\"#7B63F7\" fill=\"none\" stroke-width=\"16\" stroke-linecap=\"round\" stroke-linejoin=\"round\" pathLength=\"1\" data-motif-key=\"renewal\" class=\"identity-stroke\" style=\"--phase:0.570s\"/><path d=\"M140 740Q20 500 140 260\" stroke=\"#0B1120\" fill=\"none\" stroke-width=\"14\" stroke-linecap=\"round\" stroke-linejoin=\"round\" pathLength=\"1\" data-motif-key=\"renewal-return\" class=\"identity-stroke\" style=\"--phase:0.665s\"/><circle class=\"identity-traveller\" r=\"19\" fill=\"#7B63F7\" stroke=\"#F7F8FF\" stroke-width=\"6\"><animateMotion dur=\"1.82s\" repeatCount=\"indefinite\" path=\"M140 260H860V740H140V260\" calcMode=\"paced\"/></circle></g></g></svg>"}}/><img className="brand-loader__mark" src={logoSrc} width={70} height={70} alt=""/></span><span className="brand-loader__label">{label}</span></div>;
}
export default BrandLoader;
