extern crate alloc;
#[cfg(not(feature = "std"))]
use alloc::{format, string::{String, ToString}, vec::Vec};
#[cfg(feature = "std")]
use alloc::{format, string::String, vec::Vec};
use allfeat_music_genres::GenreId;
use frame_support::sp_runtime::RuntimeDebug;
use midds_types_codegen::{midds_collection, midds_string};
use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
use crate::MiddsId;
#[cfg(feature = "js")]
use wasm_bindgen::prelude::*;
#[midds_string(12, regex = r"^[A-Z]{2}[A-Z0-9]{3}\d{7}$")]
pub struct Isrc;
#[midds_string(256)]
pub struct TrackTitle;
#[midds_collection(TrackTitle, 16)]
pub struct TrackTitleAliases;
pub type TrackRecordYear = u16;
#[midds_collection(GenreId, 5)]
pub struct TrackGenres;
pub type TrackDuration = u16;
pub type TrackBeatsPerMinute = u16;
#[midds_collection(MiddsId, 64)]
pub struct TrackProducers;
#[midds_collection(MiddsId, 256)]
pub struct TrackPerformers;
#[midds_collection(MiddsId, 256)]
pub struct TrackContributors;
#[midds_string(256)]
pub struct TrackRecordingPlace;
#[midds_string(256)]
pub struct TrackMixingPlace;
#[midds_string(256)]
pub struct TrackMasteringPlace;
#[repr(u8)]
#[derive(
Clone,
Copy,
PartialEq,
Eq,
Encode,
Decode,
DecodeWithMemTracking,
TypeInfo,
MaxEncodedLen,
RuntimeDebug,
)]
#[cfg_attr(feature = "js", wasm_bindgen)]
pub enum TrackVersion {
Original = 0,
Live = 1,
RadioEdit = 2,
TvTrack = 3,
Single = 4,
Remix = 5,
Cover = 6,
Acoustic = 7,
Acapella = 8,
Instrumental = 9,
Orchestral = 10,
Extended = 11,
AlternateTake = 12,
ReRecorded = 13,
Karaoke = 14,
Dance = 15,
Dub = 16,
Clean = 17,
Rehearsal = 18,
Demo = 19,
Edit = 20,
}