use lazy_static::lazy_static;
use num::rational::Ratio;
use num::Rational64;
use regex::Regex;
pub(super) const SECONDS_PER_MINUTE: Rational64 = Rational64::new_raw(60, 1);
pub(super) const SECONDS_PER_HOUR: Rational64 = Rational64::new_raw(60 * 60, 1);
pub(super) const PERFS_PER_FOOT_35: i64 = 64;
pub(super) const PERFS_PER_6INCHES_16: i64 = 20;
pub(super) const PREMIERE_TICKS_PER_SECOND: Ratio<i128> = Ratio::<i128>::new_raw(254016000000, 1);
pub(super) const SECONDS_PER_MINUTE_I64: i64 = 60;
pub(super) const SECONDS_PER_HOUR_I64: i64 = SECONDS_PER_MINUTE_I64 * 60;
lazy_static! {
pub(super) static ref TIMECODE_REGEX: Regex = regex::Regex::new(
r"^(?P<negative>-)?((?P<section1>[0-9]+)[:|;])?((?P<section2>[0-9]+)[:|;])?((?P<section3>[0-9]+)[:|;])?(?P<frames>[0-9]+)$"
).unwrap();
}
lazy_static! {
pub(super) static ref FEET_AND_FRAMES_REGEX: Regex = regex::Regex::new(
r"^(?P<negative>-)?(?P<feet>[0-9]+)\+(?P<frames>[0-9]+)(\.(?P<perf>[0-9]))?$",
).unwrap();
}
lazy_static! {
pub(super) static ref RUNTIME_REGEX: Regex = regex::Regex::new(
r"^(?P<negative>-)?((?P<section1>[0-9]+)[:|;])?((?P<section2>[0-9]+)[:|;])?(?P<seconds>[0-9]+(\.[0-9]+)?)$",
).unwrap();
}