# Copyright (c) 2026, UChicago Argonne, LLC
# BSD OPEN SOURCE LICENSE. Full license can be found in LICENSE
# Copyright (c) 2026, UChicago Argonne, LLC
# BSD OPEN SOURCE LICENSE. Full license can be found in LICENSE
from ..supply_editor import LinkAdder
from ..common_tools import running_on_ci


def create_link(qgis_proj):
    if not qgis_proj.open_mode:
        qgis_proj.show_message_no_supply()
        return
    tool = LinkAdder(qgis_proj)
    tool.do_add_link_with_template()
    if running_on_ci:
        return tool
