{{!
    This file is part of Moodle - https://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle 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 Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template file/tiny/plugininfo_php

    Tiny plugininfo.php file.

    Context variables required for this template:
    * component
    * copyright

    Example context (json):
    {
        "component": "tiny_example",
        "copyright": "2022 Andrew Lyons <andrew@nicols.co.uk>"
    }
}}
{{< common/boilerplate_php }}

{{$ description }}Tiny {{ name }} plugin for Moodle.{{/ description }}

{{$ package }}{{ component }}{{/ package }}

{{$ copyright }}{{ copyright }}{{/ copyright }}

{{$ namespace }}
namespace {{ component }};
{{/ namespace }}

{{$ use }}
use context;
use editor_tiny\plugin;
{{# self.defines_buttons }}
use editor_tiny\plugin_with_buttons;
{{/ self.defines_buttons }}
{{# self.defines_menuitems }}
use editor_tiny\plugin_with_menuitems;
{{/ self.defines_menuitems }}
{{# self.defines_options }}
use editor_tiny\plugin_with_configuration;
{{/ self.defines_options }}
{{/ use }}

{{/ common/boilerplate_php }}
class plugininfo extends plugin{{!

    }}{{# self.defines_any_interfaces }} implements {{ self.interfaces }}{{/ self.defines_any_interfaces }}{{!

}} {
{{# self.defines_buttons }}

    public static function get_available_buttons(): array {
        return [
            '{{ component }}/plugin',
        ];
    }
{{/ self.defines_buttons }}
{{# self.defines_menuitems }}

    public static function get_available_menuitems(): array {
        return [
            '{{ component }}/plugin',
        ];
    }
{{/ self.defines_menuitems }}
{{# self.defines_options }}

    public static function get_plugin_configuration_for_context(
        context $context,
        array $options,
        array $fpoptions,
        ?\editor_tiny\editor $editor = null
    ): array {
        return [
            // Your values go here.
            // These will be mapped to a namespaced EditorOption in Tiny.
{{# self.options }}
            '{{ name }}' => 'TODO Calculate your values here',
{{/ self.options }}
        ];
    }
{{/ self.defines_options }}
}
