<?php

/**
 * Create a new (inactive) info popup entry for a project.
 *
 * @param string $project - encoded project data
 * @return int - id of the new entry
 */

use QUI\InfoPopup\Handler;

QUI::getAjax()->registerFunction(
    'package_quiqqer_info-popup_ajax_create',
    function ($project) {
        $Project = QUI::getProjectManager()->decode($project);

        return Handler::create($Project);
    },
    ['project'],
    'quiqqer.infoPopup.edit'
);
