from .commit_page import CommitPage
from .overview_page import OverviewPage
from .log_page import LogPage

class PageFactory:
    def __init__(self, out_dir, name, content_subdir):
        self.out_dir = out_dir
        self.name = name
        self.content_subdir = content_subdir

    def new_commit(self, commit):
        return CommitPage(self.out_dir, self.name, commit, self.content_subdir)

    def new_overview(self, branches, tags):
        return OverviewPage(self.out_dir, self.name, branches, tags, self.content_subdir)

    def new_log(self, commits, branches, tags):
        return LogPage(self.out_dir, self.name, commits, branches, tags, self.content_subdir)
