import abc

from pymcutil.resource.abc.resource import Resource
from pymcutil.resource.resource_location.abc.resource_location import ResourceLocation
from pymcutil.resource.resource_manager.abc.resource_manager import ResourceManager
from pymcutil.resource.resource_reference.abc.resource_reference import ResourceReference


class ResourceGenerator(abc.ABC):
    @abc.abstractmethod
    def location(self, manager: ResourceManager, reference: ResourceReference) -> ResourceLocation:
        """ Return a `ResourceLocation` for the resource that would be generated by the given `ResourceReference`. """

    @abc.abstractmethod
    def generate(self, manager: ResourceManager, reference: ResourceReference) -> Resource:
        """ Return a `Resource` generated using the given `ResourceReference`."""
