use core::marker::PhantomData;
use crate::{BackingStore, ChannelMap};
use crate::illuminant::{D65, Illuminant};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub struct Lab<W: Illuminant = D65, const OFFSET: usize = 0>(PhantomData<W>);
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub struct LCh<W: Illuminant = D65, const OFFSET: usize = 0>(PhantomData<W>);
impl<W: Illuminant, const OFFSET: usize> BackingStore<[f32; 3]> for Lab<W, OFFSET> {}
impl<W: Illuminant, const OFFSET: usize> BackingStore<[f32; 4]> for Lab<W, OFFSET> {}
impl<W: Illuminant, const OFFSET: usize> BackingStore<[f32; 3]> for LCh<W, OFFSET> {}
impl<W: Illuminant, const OFFSET: usize> BackingStore<[f32; 4]> for LCh<W, OFFSET> {}
impl<W: Illuminant, const OFFSET: usize> ChannelMap<4> for Lab<W, OFFSET> {
const INDICES: [usize; 4] = [OFFSET, OFFSET + 1, OFFSET + 2, 3 - OFFSET * 3];
}
impl<W: Illuminant, const OFFSET: usize> ChannelMap<4> for LCh<W, OFFSET> {
const INDICES: [usize; 4] = [OFFSET, OFFSET + 1, OFFSET + 2, 3 - OFFSET * 3];
}
#[cfg(feature = "glam")]
mod glam_impls {
use super::*;
impl<W: Illuminant, const OFFSET: usize> BackingStore<glam::Vec3> for Lab<W, OFFSET> {}
impl<W: Illuminant, const OFFSET: usize> BackingStore<glam::Vec3A> for Lab<W, OFFSET> {}
impl<W: Illuminant, const OFFSET: usize> BackingStore<glam::Vec4> for Lab<W, OFFSET> {}
impl<W: Illuminant, const OFFSET: usize> BackingStore<glam::Vec3> for LCh<W, OFFSET> {}
impl<W: Illuminant, const OFFSET: usize> BackingStore<glam::Vec3A> for LCh<W, OFFSET> {}
impl<W: Illuminant, const OFFSET: usize> BackingStore<glam::Vec4> for LCh<W, OFFSET> {}
}