# standard
from __future__ import annotations

from pathlib import Path
from typing import TYPE_CHECKING, Optional

# PyQGIS
from qgis.PyQt import uic
from qgis.PyQt.QtGui import QIcon

# Project
from oslandia.__about__ import DIR_PLUGIN_ROOT
from oslandia.gui.onboarding.wdg_base_page import WidgetPageBase


if TYPE_CHECKING:
    from qgis.PyQt.QtWidgets import QWidget


class ShowcaseFeaturesPage(WidgetPageBase):
    def __init__(self, parent: Optional[QWidget] = None):
        super().__init__(parent)
        uic.loadUi(Path(__file__).parent / f"{Path(__file__).stem}.ui", self)

        self.btn_next.clicked.connect(lambda: self.next_page_signal.emit(0))
        self.btn_next.setIcon(QIcon(":images/themes/default/mActionArrowRight.svg"))

        img_list = [
            DIR_PLUGIN_ROOT
            / "resources/images/onboarding/featured_screenshot_showcase_01.png",
            DIR_PLUGIN_ROOT
            / "resources/images/onboarding/featured_screenshot_showcase_02.png",
        ]
        self.wdg_images.set_image_list(img_list)
