'use client'; import { HTMLAttributes } from 'react'; export interface DepthIndicatorProps extends HTMLAttributes { currentDepth: number; minDepth?: number; maxDepth?: number; unit?: string; label?: string; position?: 'left' | 'right'; showValue?: boolean; } export const DepthIndicatorTailwind = ({ currentDepth, minDepth = 0, maxDepth = 100, unit = 'm', label = 'DEPTH', position = 'left', showValue = true, className = '', ...props }: DepthIndicatorProps) => { const percentage = Math.min(100, Math.max(0, ((currentDepth - minDepth) / (maxDepth - minDepth)) * 100)); return (
{label}
{showValue && {currentDepth}{unit}}
); };