use primitives::algebra::{
elliptic_curve::{BaseFieldElement, Point, Scalar},
field::{subfield_element::Mersenne107Element, Bit},
};
use serde::Deserialize;
#[cfg(test)]
use serde::Serialize;
use crate::circuit::old::legacy_codec::{legacy, LegacyBytes};
#[derive(Deserialize)]
#[cfg_attr(test, derive(Serialize))]
#[repr(C)]
pub enum Plaintext<T: LegacyBytes> {
Fixed(#[serde(with = "legacy")] T),
Input(usize),
}
pub type ScalarPlaintext<C> = Plaintext<Scalar<C>>;
pub type BaseFieldPlaintext<C> = Plaintext<BaseFieldElement<C>>;
pub type Mersenne107Plaintext = Plaintext<Mersenne107Element>;
pub type PointPlaintext<C> = Plaintext<Point<C>>;
pub type BitPlaintext = Plaintext<Bit>;
pub type ScalarPlaintextBatch<C> = Plaintext<Vec<Scalar<C>>>;
pub type BaseFieldPlaintextBatch<C> = Plaintext<Vec<BaseFieldElement<C>>>;
pub type Mersenne107PlaintextBatch = Plaintext<Vec<Mersenne107Element>>;
pub type PointPlaintextBatch<C> = Plaintext<Vec<Point<C>>>;
pub type BitPlaintextBatch = Plaintext<Vec<Bit>>;