import * as React from 'react'; import { FC } from 'react'; import { style } from 'typestyle'; import { pillActiveBackgroundColor, pillBackgroundColor } from '../../consts'; interface PlayerNavButtonProps { direction: 'left' | 'right' | 'up' | 'down'; onClick: () => void; ariaLabel?: string; disabled?: boolean; } const defaultLabel = (dir: PlayerNavButtonProps['direction']) => { if (dir === 'left') return 'Previous'; if (dir === 'right') return 'Next'; if (dir === 'up') return 'Previous'; return 'Next'; }; const svgPath = (dir: PlayerNavButtonProps['direction']) => { switch (dir) { case 'left': return 'M15 18l-6-6 6-6'; case 'right': return 'M9 18l6-6-6-6'; case 'up': return 'M18 15l-6-6-6 6'; case 'down': return 'M6 9l6 6 6-6'; } }; const PlayerNavButton: FC = ({ direction, onClick, ariaLabel, disabled = false, }) => ( ); export default PlayerNavButton; const styles = { button: style({ flexShrink: 0, width: 40, height: 40, padding: '5px', borderRadius: '50%', border: 'none', backgroundColor: pillBackgroundColor, backdropFilter: 'blur(3px)', '-webkit-backdrop-filter': 'blur(3px)', display: 'flex', alignItems: 'center', justifyContent: 'center', cursor: 'pointer', transition: 'opacity 0.2s ease', $nest: { '&:active': { backgroundColor: pillActiveBackgroundColor, }, '&:focus-visible': { outline: '2px solid white', outlineOffset: '2px', }, }, }), buttonDisabled: style({ opacity: 0.25, cursor: 'default', pointerEvents: 'none' as const, }), };