import { useId, type SVGProps } from 'react';

export type CampusIconProps = SVGProps<SVGSVGElement> & {
  /** Accessibility title for the icon, set aria-hidden="true" if the icon is purely decorative. */
  title?: string;
  /**
   * The size of the icon.
   * It sets the font-size, possible as the width and height is `1em`. If not set, the icon will inherit the font size of its parent.
   */
  size?: '2xl' | 'xl' | 'large' | 'medium' | 'small';
  /**
   * The color of the icon.
   * @default 'inherit'
   */
  color?: 'inherit' | 'primary' | 'gray' | 'black' | 'white';
};

export const CampusIcon = ({ title, size, color, ...props }: CampusIconProps) => {
  const titleId = useId();
  return (
    <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24" focusable='false' role='img' width='1em' height='1em'  aria-labelledby={title ? titleId : undefined} data-size={size} data-color={color} {...props}>{title ? <title id={titleId}>{title}</title> : null}<path d="M15.285 8.75V5.987L8.715 7.82v.931H10v8.75h4V8.75zm.215 9.75h5v-8.25h-5zm-12 0h5v-8.25h-5zM22 8.75V20h-8v-1h-4v1H2V8.75h5.215V6.68l9.57-2.667V8.75z" /><path d="M6.785 12h-1.5v1.5h1.5zm12 0h-1.5v1.5h1.5zm-12 2.75h-1.5v1.5h1.5zm12 0h-1.5v1.5h1.5zM12.75 15h-1.5v2.5h1.5z" /></svg>
  );
};