import { CSSProperties } from 'react'; import { slideTypes } from '../timeline'; type cornerTypes = 'round' | 'diamond' | 'square' | 'square-s'; var slideTypeToCornerType = { default: 'diamond', loop: 'square', speedChange: 'square', delay: 'round', }; function Corner(props: { type: cornerTypes; direction: 'tl' | 'tr' | 'bl' | 'br'; }) { var className = 'corner posabs ' + props.direction + ' '; if (props.direction[0] == 't') className += 't0 '; if (props.direction[0] == 'b') className += 'b0 '; if (props.direction[1] == 'l') className += 'l0 '; if (props.direction[1] == 'r') className += 'r0 '; var style: CSSProperties = { transform: '' }; if (props.direction[0] == 'b') style.transform += 'scaleY(-1) '; if (props.direction[1] == 'l') style.transform += 'scaleX(-1) '; if (props.type == 'square-s') { className += 'small '; return ; } return {{ 'round': , 'diamond': , 'square': , }[props.type]} ; } export default function Selection(props: { width: number; height: number; left?: slideTypes; right?: slideTypes; className?: string; }) { var small = props.width < 24 || props.height < 24 || !props.left || !props.right; return
; }