"use client";
import type { CSSProperties } from "react";
import "./loader.css";
export type BrandLoaderProps = { loading:boolean; fullscreen?:boolean; logoSrc:string; label?:string; className?:string };
/** A small observation ripple follows one user path through the window. Uses actual application readiness. */
export function BrandLoader({loading,fullscreen=true,logoSrc,label="Loading UserXperia",className=""}:BrandLoaderProps){
 if(!loading)return null;
 const style={"--brand-loader-primary":"#7C3AED","--brand-loader-secondary":"#06B6D4","--brand-loader-ink":"#211634","--brand-loader-paper":"#FAF7FE","--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={"UserXperia"}>
 <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=\"userxperia\" aria-hidden=\"true\"><defs><clipPath id=\"clear-userxperia\"><path clip-rule=\"evenodd\" d=\"M0 0H1000V1000H0Z M275 275V725H725V275Z\"/></clipPath></defs><g clip-path=\"url(#clear-userxperia)\"><g class=\"identity-grammar\"><path d=\"M90 260C320 140 260 680 610 600S850 300 920 420\" stroke=\"#7C3AED\" fill=\"none\" stroke-width=\"24\" stroke-linecap=\"round\" stroke-linejoin=\"round\" pathLength=\"1\" data-motif-key=\"first-user-path\" class=\"identity-stroke\" style=\"--phase:0.000s\"/><path d=\"M80 780C380 860 390 220 700 300S850 670 930 710\" stroke=\"#06B6D4\" fill=\"none\" stroke-width=\"18\" stroke-linecap=\"round\" stroke-linejoin=\"round\" pathLength=\"1\" data-motif-key=\"second-user-path\" class=\"identity-stroke\" style=\"--phase:0.095s\"/><rect x=\"370\" y=\"250\" width=\"280\" height=\"500\" stroke=\"#211634\" fill=\"none\" stroke-width=\"12\" stroke-linecap=\"round\" stroke-linejoin=\"round\" pathLength=\"1\" data-motif-key=\"observation-window\" class=\"identity-stroke\" style=\"--phase:0.190s\"/><circle cx=\"610\" cy=\"600\" r=\"50\" stroke=\"#06B6D4\" fill=\"none\" stroke-width=\"16\" stroke-linecap=\"round\" stroke-linejoin=\"round\" pathLength=\"1\" data-motif-key=\"experience-insight\" class=\"identity-stroke\" style=\"--phase:0.285s\"/></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;
