# Path: mugen/video/segments/ImageSegment.py
# class ImageSegment(Segment, ImageClip):
#     """
#     A segment with an image
#     """
# 
#     file: str
# 
#     def __init__(self, file: str, duration: float = 1, **kwargs):
#         """
#         Parameters
#         ----------
#         file
#             path to the image file.
#             Supports any extension supported by ffmpeg.
#         """
#         super().__init__(file, duration=duration, **kwargs)
# 
#         self.file = file
#         self.fps = Segment.DEFAULT_VIDEO_FPS
# 
#     def __repr__(self):
#         return f"<{self.__class__.__name__}: {self.name}, duration: {self.duration}>"
# 
#     @property
#     def name(self) -> str:
#         return Path(self.file).stem
# 
#     def trailing_buffer(self, duration) -> "ImageSegment":
#         return ImageSegment(self.file, duration)
# 
# Path: mugen/video/sources/Source.py
# class Source(Taggable, Weightable, ABC):
#     """
#     A content source for sampling segments of content
#     """
# 
#     @property
#     @abstractmethod
#     def name(self) -> str:
#         """
#         Human-readable name for the source
#         """
#         pass
# 
#     @abstractmethod
#     def sample(self, duration: float) -> Segment:
#         pass


from mugen.video.segments.ImageSegment import ImageSegment
from mugen.video.sources.Source import Source


class ImageSource(Source):
    """
    An image source for sampling image segments
    """

    def __init__(self, file: str, **kwargs):
        super().__init__(**kwargs)
        self.segment = ImageSegment(file)

    @property
    def file(self):
        return self.segment.file

    @property
    def name(self):
        return self.segment.name


# Path: mugen/video/segments/ImageSegment.py
# class ImageSegment(Segment, ImageClip):
#     """
#     A segment with an image
#     """
# 
#     file: str
# 
#     def __init__(self, file: str, duration: float = 1, **kwargs):
#         """
#         Parameters
#         ----------
#         file
#             path to the image file.
#             Supports any extension supported by ffmpeg.
#         """
#         super().__init__(file, duration=duration, **kwargs)
# 
#         self.file = file
#         self.fps = Segment.DEFAULT_VIDEO_FPS
# 
#     def __repr__(self):
#         return f"<{self.__class__.__name__}: {self.name}, duration: {self.duration}>"
# 
#     @property
#     def name(self) -> str:
#         return Path(self.file).stem
# 
#     def trailing_buffer(self, duration) -> "ImageSegment":
#         return ImageSegment(self.file, duration)
# 
# Path: mugen/video/sources/Source.py
# class Source(Taggable, Weightable, ABC):
#     """
#     A content source for sampling segments of content
#     """
# 
#     @property
#     @abstractmethod
#     def name(self) -> str:
#         """
#         Human-readable name for the source
#         """
#         pass
# 
#     @abstractmethod
#     def sample(self, duration: float) -> Segment:
#         pass


# Path: mugen/video/sources/ImageSource.py
from mugen.video.segments.ImageSegment import ImageSegment
from mugen.video.sources.Source import Source



class ImageSource(Source):
    """
    An image source for sampling image segments
    """

    def __init__(self, file: str, **kwargs):
        super().__init__(**kwargs)
        self.segment = ImageSegment(file)

    @property
    def file(self):
        return self.segment.file

    @property
    def name(self):
        return self.segment.name


    def sample(self, duration: float) -> ImageSegment: