'use client';
import { forwardRef, ButtonHTMLAttributes } from 'react';
import styles from './potion-flask.module.css';
export type PotionColor = 'health' | 'mana' | 'poison' | 'strength' | 'invisibility';
export interface PotionFlaskProps extends ButtonHTMLAttributes {
/** Type of potion for color and effect */
potionColor?: PotionColor;
/** Number of bubbles to show */
bubbles?: boolean | number;
/** Size of the flask */
size?: 'sm' | 'md' | 'lg';
}
const potionColors: Record = {
health: { liquid: '#e53935', glow: '#ff5252', cork: '#8d6e63' },
mana: { liquid: '#1e88e5', glow: '#42a5f5', cork: '#8d6e63' },
poison: { liquid: '#43a047', glow: '#66bb6a', cork: '#6d4c41' },
strength: { liquid: '#ff9800', glow: '#ffb74d', cork: '#8d6e63' },
invisibility: { liquid: '#9e9e9e', glow: '#e0e0e0', cork: '#8d6e63' },
};
export const PotionFlask = forwardRef(
(
{
children,
potionColor = 'health',
bubbles = true,
size = 'md',
className,
style,
...props
},
ref
) => {
const colors = potionColors[potionColor];
const bubbleCount = typeof bubbles === 'number' ? bubbles : bubbles ? 8 : 0;
return (
);
}
);
PotionFlask.displayName = 'PotionFlask';
export default PotionFlask;