from yta_general_utils.programming.enum import YTAEnum as Enum


class _Field(Enum):
    """
    Enum class to represent the names of the
    fields we are able to handle in the app.

    This has been built to have all the names
    centralized in one place and to reuse in
    any app part in which it is needed.

    For internal use only. Use a more specific
    Enum class to interact with the different
    field names.
    """

    STATUS = 'status'
    """
    The status of an element, that will tell us
    if it is being constructed, waiting for it,
    etc.
    """
    SEGMENTS = 'segments'
    """
    The segments that a project includes and have
    to be built.
    """
    TYPE = 'type'
    """
    The type of some specific element. See the 
    specific type Enum classes.
    """
    TEXT = 'text'
    """
    The text that has to be written in some 
    segment with text content.
    """
    TEXT_TO_NARRATE = 'text_to_narrate'
    """
    The text that has to be used for a voice
    narration. This text can include shortcodes
    because it will be narrated and it is 
    possible to add some modifications (the ones
    that the shortcodes indicate) according to
    the moment in which some words are said.
    """
    DURATION = 'duration'
    """
    The length of time that the element being
    referenced will be displayed or occurring.
    """
    KEYWORDS = 'keywords'
    """
    The terms or sentence to make a search on
    Youtube, to create the specific premade, etc.
    Keywords to identify the expected behaviour.
    """
    URL = 'url'
    """
    The url from which we can obtain a resource
    that has to be included as part (or the
    whole) content of the element.
    """
    FILENAME = 'filename'
    """
    The local filename of the file that has to
    be included as part (or the whole) content 
    of the element.
    """
    VOICE = 'voice'
    """
    The voice that has to be used to create the
    voice narration.
    """
    AUDIO_NARRATION_FILENAME = 'audio_narration_filename'
    """
    The filename of an audio that has to be 
    included as the voice narration (so it will
    not be created).
    """
    MUSIC = 'music'
    """
    The filename of a music that has to be included
    as an audio part for the content.
    """
    ENHANCEMENTS = 'enhancements'
    """
    The enhancements that have to be built for the
    content.
    """
    START = 'start'
    """
    The time moment in which the content has to start.
    """
    MODE = 'mode'
    """
    The mode in which the content has to be included.
    """
    EXTRA_PARAMS = 'extra_params'
    """
    The extra parameters we need to build some of the
    content.
    """
    # Building fields below
    TRANSCRIPTION = 'transcription'
    """
    The transcription of the audio narration if 
    existing.
    """
    SHORTCODES = 'shortcodes'
    """
    The shortcodes found in an audio narration.
    """
    AUDIO_FILENAME = 'audio_filename'
    """
    The filename of the audio that has been 
    generated by the system and has to be used
    as the audio content part.
    """
    AUDIO_CLIP = 'audio_clip'
    """
    The clip generated from the 'audio_filename'.
    """
    VIDEO_FILENAME = 'video_filename'
    """
    The filename of the video part that has 
    been generated by the system and has to be
    used as the video content part.
    """
    VIDEO_CLIP = 'video_clip'
    """
    The clip generated from the 'video_filename'.
    """
    FULL_FILENAME = 'full_filename'
    """
    The filename of the video and audio part put
    together, generated by the system, and that
    is the whole segment content with the effects
    and everything appliedo n it.
    """
    FULL_CLIP = 'full_clip'
    """
    The clip generated from the 'full_filename'.
    """

class ProjectField(Enum):
    """
    Enum class to represent the names of the
    fields related to a Project.
    """

    STATUS = _Field.STATUS.value
    """
    The status of an element, that will tell us
    if it is being constructed, waiting for it,
    etc.

    See ProjectStatus Enum class.
    """
    SEGMENTS = _Field.SEGMENTS.value
    """
    The segments that a project includes and have
    to be built.
    """

class SegmentField(Enum):
    """
    Enum class to represent the names of the
    fields related to a Segment (which belongs
    to a Project).
    """

    TYPE = _Field.TYPE.value
    """
    The type of a segment, that determins what
    kind of content will be used to fulfill that
    segment.
    """
    TEXT = _Field.TEXT.value
    """
    The text that has to be written in some 
    segment with text content.
    """
    TEXT_TO_NARRATE = _Field.TEXT_TO_NARRATE.value
    """
    The text that has to be used for a voice
    narration. This text can include shortcodes
    because it will be narrated and it is 
    possible to add some modifications (the ones
    that the shortcodes indicate) according to
    the moment in which some words are said.
    """
    DURATION = _Field.DURATION.value
    """
    The length of time that the segment being
    referenced will be displayed or occurring.
    """
    KEYWORDS = _Field.KEYWORDS.value
    """
    The terms or sentence to make a search on
    Youtube, to create the specific premade, etc.
    Keywords to identify the expected behaviour.
    """
    URL = _Field.URL.value
    """
    The url from which we can obtain a resource
    that has to be included as part (or the
    whole) content of the element.
    """
    FILENAME = _Field.FILENAME.value
    """
    The local filename of the file that has to
    be included as part (or the whole) content 
    of the element.
    """
    VOICE = _Field.VOICE.value
    """
    The voice that has to be used to create the
    voice narration.
    """
    AUDIO_NARRATION_FILENAME = _Field.AUDIO_NARRATION_FILENAME.value
    """
    The filename of an audio that has to be 
    included as the voice narration (so it will
    not be created).
    """
    MUSIC = _Field.MUSIC.value
    """
    The filename of a music that has to be included
    as an audio part for the content.
    """
    ENHANCEMENTS = _Field.ENHANCEMENTS.value
    """
    The enhancements that have to be built for the
    content.
    """
    EXTRA_PARAMS = _Field.EXTRA_PARAMS.value
    """
    The extra parameters we need to build some of the
    content.
    """

class EnhancementField(Enum):
    """
    Enum class to represent the names of the
    fields related to an Enhancement (which
    belongs to a Project Segment).
    """

    TYPE = _Field.TYPE.value
    """
    The type of an Enhancement, that determins
    what kind of content will be used to fulfill
    that segment.
    """
    KEYWORDS = _Field.KEYWORDS.value
    """
    The terms or sentence to make a search on
    Youtube, to create the specific premade, etc.
    Keywords to identify the expected behaviour.
    """
    URL = _Field.URL.value
    """
    The url from which we can obtain a resource
    that has to be included as part (or the
    whole) content of the element.
    """
    FILENAME = _Field.FILENAME.value
    """
    The local filename of the file that has to
    be included as part (or the whole) content 
    of the element.
    """
    TEXT_TO_NARRATE = _Field.TEXT_TO_NARRATE.value
    """
    The text that has to be used for a voice
    narration. This text can include shortcodes
    because it will be narrated and it is 
    possible to add some modifications (the ones
    that the shortcodes indicate) according to
    the moment in which some words are said.
    """
    VOICE = _Field.VOICE.value
    """
    The voice that has to be used to create the
    voice narration.
    """
    TEXT = _Field.TEXT.value
    """
    The text that has to be written in some 
    segment with text content.
    """
    DURATION = _Field.DURATION.value
    """
    The length of time that the segment being
    referenced will be displayed or occurring.
    """
    AUDIO_NARRATION_FILENAME = _Field.AUDIO_NARRATION_FILENAME.value
    """
    The filename of an audio that has to be 
    included as the voice narration (so it will
    not be created).
    """
    MUSIC = _Field.MUSIC.value
    """
    The filename of a music that has to be included
    as an audio part for the content.
    """
    ENHANCEMENTS = _Field.ENHANCEMENTS.value
    """
    The enhancements that have to be built for the
    content.
    """
    START = _Field.START.value
    """
    The time moment in which the content has to start.
    """
    MODE = _Field.MODE.value
    """
    The mode in which the content has to be included.
    """
    EXTRA_PARAMS = _Field.EXTRA_PARAMS.value
    """
    The extra parameters we need to build some of the
    content.
    """

class ShortcodeField(Enum):
    """
    Enum class to represent the names of the
    fields related to a Shortcode (which
    was detected within a Segment or Enhancement
    text).
    """

    TYPE = _Field.TYPE.value
    """
    The type of a Shortcode, that determins
    what kind of content will be used to fulfill
    that segment.
    """
    KEYWORDS = _Field.KEYWORDS.value
    """
    The terms or sentence to make a search on
    Youtube, to create the specific premade, etc.
    Keywords to identify the expected behaviour.
    """
    URL = _Field.URL.value
    """
    The url from which we can obtain a resource
    that has to be included as part (or the
    whole) content of the element.
    """
    FILENAME = _Field.FILENAME.value
    """
    The local filename of the file that has to
    be included as part (or the whole) content 
    of the element.
    """
    TEXT_TO_NARRATE = _Field.TEXT_TO_NARRATE.value
    """
    The text that has to be used for a voice
    narration. This text can include shortcodes
    because it will be narrated and it is 
    possible to add some modifications (the ones
    that the shortcodes indicate) according to
    the moment in which some words are said.
    """
    VOICE = _Field.VOICE.value
    """
    The voice that has to be used to create the
    voice narration.
    """
    TEXT = _Field.TEXT.value
    """
    The text that has to be written in some 
    segment with text content.
    """
    DURATION = _Field.DURATION.value
    """
    The length of time that the segment being
    referenced will be displayed or occurring.
    """
    AUDIO_NARRATION_FILENAME = _Field.AUDIO_NARRATION_FILENAME.value
    """
    The filename of an audio that has to be 
    included as the voice narration (so it will
    not be created).
    """
    MUSIC = _Field.MUSIC.value
    """
    The filename of a music that has to be included
    as an audio part for the content.
    """
    ENHANCEMENTS = _Field.ENHANCEMENTS.value
    """
    The enhancements that have to be built for the
    content.
    """
    START = _Field.START.value
    """
    The time moment in which the content has to start.
    """
    MODE = _Field.MODE.value
    """
    The mode in which the content has to be included.
    """
    EXTRA_PARAMS = _Field.EXTRA_PARAMS.value
    """
    The extra parameters we need to build some of the
    content.
    """

class ProjectBuildingField(Enum):
    """
    The fields of a Project that are used when its
    content is being built and doesn't come from
    the original json source.
    """

    STATUS = _Field.STATUS.value
    """
    The status of the Project, that will tell us
    if it is being constructed, waiting for it,
    etc.
    """

class SegmentBuildingField(Enum):
    """
    The fields that are used when building the
    Segment and are not provided by the user in
    the initial json data.
    """

    STATUS = _Field.STATUS.value
    """
    The status of the Segment, that will tell us
    if it is being constructed, waiting for it,
    etc.
    """
    TRANSCRIPTION = _Field.TRANSCRIPTION.value
    """
    The transcription of the audio narration of
    the segment if existing.
    """
    SHORTCODES = _Field.SHORTCODES.value
    """
    The shortcodes that have been found in the
    audio narration.
    """
    AUDIO_FILENAME = _Field.AUDIO_FILENAME.value
    """
    The filename of the audio that has been 
    generated by the system and has to be used
    as the audio content part.
    """
    AUDIO_CLIP = _Field.AUDIO_CLIP.value
    """
    The clip generated from the 'audio_filename'.
    """
    VIDEO_FILENAME = _Field.VIDEO_FILENAME.value
    """
    The filename of the video part that has 
    been generated by the system and has to be
    used as the video content part.
    """
    VIDEO_CLIP = _Field.VIDEO_CLIP.value
    """
    The clip generated from the 'video_filename'.
    """
    FULL_FILENAME = _Field.FULL_FILENAME.value
    """
    The filename of the video and audio part put
    together, generated by the system, and that
    is the whole segment content with the effects
    and everything appliedo n it.
    """
    FULL_CLIP = _Field.FULL_CLIP.value
    """
    The clip generated from the 'full_filename'.
    """

class EnhancementBuildingField(Enum):
    """
    The fields that are used when building the 
    Enhancement and are not provided by the user
    in the initial json data.
    """

    STATUS = _Field.STATUS.value
    """
    The status of the Segment, that will tell us
    if it is being constructed, waiting for it,
    etc.
    """
    TRANSCRIPTION = _Field.TRANSCRIPTION.value
    """
    The transcription of the audio narration of
    the segment if existing.
    """
    AUDIO_FILENAME = _Field.AUDIO_FILENAME.value
    """
    The filename of the audio that has been 
    generated by the system and has to be used
    as the audio content part.
    """
    AUDIO_CLIP = _Field.AUDIO_CLIP.value
    """
    The clip generated from the 'audio_filename'.
    """
    VIDEO_FILENAME = _Field.VIDEO_FILENAME.value
    """
    The filename of the video part that has 
    been generated by the system and has to be
    used as the video content part.
    """
    VIDEO_CLIP = _Field.VIDEO_CLIP.value
    """
    The clip generated from the 'video_filename'.
    """
    FULL_FILENAME = _Field.FULL_FILENAME.value
    """
    The filename of the video and audio part put
    together, generated by the system, and that
    is the whole segment content with the effects
    and everything appliedo n it.
    """
    FULL_CLIP = _Field.FULL_CLIP.value
    """
    The clip generated from the 'full_filename'.
    """