import { Accessibility, ArrowLeft, ArrowRight, Baby, BellRing, Building, Building2, CircleDot, CircleParking, CirclePlus, CircleX, Cog, Contact, Cross, Dot, Euro, FerrisWheel, Film, GraduationCap, Heart, Heater, House, Info, LayoutDashboard, type LucideProps, Mail, MessageSquareText, MessagesSquare, Milestone, Paperclip, Pointer, Search, ShoppingCart, SlidersHorizontal, Sofa, Star, Target, ThermometerSun, ThumbsUp, Trees, TriangleAlert, User, Users, Wifi, } from "lucide-react"; import type { ComponentPropsWithoutRef, ForwardRefExoticComponent, RefAttributes, } from "react"; import toast from "react-hot-toast"; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "~/components/ui/tooltip"; const iconOptions = [ "heater", "error", "warning", "sofa", "building", "building2", "wifi", "accessibility", "baby", "thermometer-sun", "circle-plus", "circle-dot", "dot", "cog", "check", "search", "contact", "euro", "dashboard", "settings", "user", "users", "messages", "message", "arrowR", "arrowL", "attachment", "cart", "star", "house", "heart", "info", "mail", "school", "cross", "park", "parking", "film", "milestone", "entertainment", "circle-help", "bell", "target", "thumbs-up", ] as const; export type IconType = (typeof iconOptions)[number]; type LucidePropsType = ForwardRefExoticComponent< Omit & RefAttributes >; interface IconMatrixProps extends ComponentPropsWithoutRef { type: IconType; } export const IconMatrix = ({ type, ...rest }: IconMatrixProps) => { switch (type) { case "heater": return ; case "error": return ; case "warning": return ; case "sofa": return ; case "building": return ; case "building2": return ; case "wifi": return ; case "accessibility": return ; case "baby": return ; case "thermometer-sun": return ; case "circle-plus": return ; case "circle-dot": return ; case "dot": return ; case "cog": return ; case "check": return ; case "search": return ; case "contact": return ; case "euro": return ; case "dashboard": return ; case "settings": return ; case "user": return ; case "users": return ; case "messages": return ; case "message": return ; case "arrowR": return ; case "arrowL": return ; case "attachment": return ; case "cart": return ; case "star": return ; case "house": return ; case "heart": return ; case "info": return ; case "mail": return ; case "school": return ; case "cross": return ; case "park": return ; case "parking": return ; case "film": return ; case "milestone": return ; case "entertainment": return ; case "circle-help": return ; case "bell": return ; case "target": return ; case "thumbs-up": return ; } }; export const IconMatrixTooltip = () => { return ( Lista Icone
{iconOptions.map((icon) => ( ))}
); }; /* type IRP_readOnly = { readOnly: true; value: number; setValue?: never; }; type IRP_dynamic = { readOnly?: false; value: number; setValue: (value: number) => void; }; type IconRatingProps = { maxRating?: number; icon: IconType; outline?: boolean; zeroable?: boolean; iconClassName?: string; } & (IRP_readOnly | IRP_dynamic); export const IconRatingComonent = ({ maxRating = 5, value, setValue, icon, outline = false, zeroable = false, iconClassName, readOnly = false, }: IconRatingProps) => { return (
*:has(~*:hover)]:stroke-yellow-500 [&>*:hover]:stroke-yellow-500" : "[&>*:has(~*:hover)]:fill-yellow-500 [&>*:hover]:fill-yellow-500"), )} > {Array.from({ length: maxRating }, (_, i) => ( { if (zeroable && value == 1 && i == 0) { setValue(0); } else { setValue(i + 1); } }, })} /> ))}
); }; */ export const ShieldExclamationIcon = ({ className, }: { className?: string; }) => ( Shield ); export const QuestionMarkCircleIcon = ({ className, }: { className?: string; }) => ( QuestionMark ); export const HomeIcon = ({ className }: { className?: string }) => ( Home ); const CheckCircleIcon = ({ className }: { className?: string }) => ( CheckCircle );