import { useCurrentFrame, useVideoConfig } from "remotion"; import { StyleAndClass } from "@asius/base"; import { ProgressbarProps } from "@asius/base"; import { useColors } from "../useColors"; export const defaultProgressbarProps: ProgressbarProps = { comp: "progressbar", barWidth: 30, topRight: false, color: "#ff00ffff", bg: "#0000FFFF", type: "square", height: 100, width: 100, }; export const Progressbar = ({ color, bg, style, className, height = 0, width = 0, ...props }: ProgressbarProps & StyleAndClass) => { const frame = useCurrentFrame(); const { durationInFrames } = useVideoConfig(); const progress = (frame / durationInFrames) * 100; const getColor = useColors(); if (props.type === "line") return (