# -*- coding: utf-8 -*-
"""
rem_provider.py
Processing provider — registers both REM tools.
"""

import os
from qgis.core import QgsProcessingProvider
from qgis.PyQt.QtGui import QIcon
from .algorithms.create_river_line import CreateRiverLineAlgorithm
from .algorithms.generate_rem import GenerateREMAlgorithm


class REMProvider(QgsProcessingProvider):

    def loadAlgorithms(self):
        self.addAlgorithm(CreateRiverLineAlgorithm())
        self.addAlgorithm(GenerateREMAlgorithm())

    def id(self):
        return "rem"

    def name(self):
        return "REM Tools"

    def longName(self):
        return "Relative Elevation Model (REM) Tools"

    def icon(self):
        icon_path = os.path.join(os.path.dirname(__file__), "icon.png")
        return QIcon(icon_path)