# SPDX-License-Identifier: GPL-3.0-only
# MuseScore-Studio-CLA-applies
#
# MuseScore Studio
# Music Composition & Notation
#
# Copyright (C) 2026 MuseScore Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

muse_create_qml_module(muse_toast_qml ALIAS muse::toast_qml FOR muse_toast)

qt_add_qml_module(muse_toast_qml
    URI Muse.Toast
    VERSION 1.0
    SOURCES
        toastlistmodel.cpp
        toastlistmodel.h
        dev/toasttestsmodel.cpp
        dev/toasttestsmodel.h
    QML_FILES
        ToastItem.qml
        ToastProgressBar.qml
        ToastProvider.qml
        dev/ToastNotificationTests.qml
    IMPORTS
        QtQuick
        TARGET muse_ui_qml
        TARGET muse_uicomponents_qml
)

fixup_qml_module_dependencies(muse_toast_qml)

target_link_libraries(muse_toast_qml PRIVATE muse::ui_qml muse::uicomponents_qml Qt::Quick)

# Necessary for the auto-generated sources
target_include_directories(muse_toast_qml PRIVATE dev)
