{{!
    This file is part of Moodle - http://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 mod_pcast/standard_action_menu
    Actions panel is displayed at the top of the episode listing.
    Classes required for JS:
        * none
    Data attributes required for JS:
        * none
    Context variables required for this template:
        * see mod/pcast/classes/output/standard_action_bar.php
    Example context (json):
    {
        "addnewbutton": {
            "method" : "get",
            "url" : "#",
            "primary" : true,
            "tooltip" : "This is a tooltip",
            "label" : "This is a the button text",
            "id": "someid",
            "attributes": [
                {
                  "name": "data-attribute",
                  "value": "yeah"
                }
            ]
        },
        "tools": {
            "button": {
                "method" : "get",
                "url" : "#",
                "primary" : true,
                "tooltip" : "This is a tooltip",
                "label" : "This is a the button text",
                "id": "anotherid",
                "attributes": [
                    {
                      "name": "data-attribute",
                      "value": "yeah"
                    }
                ]
            },
            "select": {
                "options": [
                    {
                        "url": "www.google.com",
                        "string": "Google"
                    },
                    {
                        "url": "www.yahoo.com",
                        "string": "Yahoo"
                    }
                ]
            }
        },
        "tabjumps":
        {
            "id": "url_select_test",
            "action": "https://example.com/post",
            "formid": "url_select_form",
            "sesskey": "sesskey",
            "label": "core/url_select",
            "helpicon": {
                "title": "Help with something",
                "text": "Help with something",
                "url": "http://example.org/help",
                "linktext": "",
                "icon":{
                    "extraclasses": "iconhelp",
                    "attributes": [
                        {"name": "src", "value": "../../../pix/help.svg"},
                        {"name": "alt", "value": "Help icon"}
                    ]
                }
            },
            "showbutton": "Go",
            "options": [{
                "name": "Group 1", "isgroup": true, "options":
                [
                    {"name": "Item 1", "isgroup": false, "value": "1"},
                    {"name": "Item 2", "isgroup": false, "value": "2"}
                ]},
                {"name": "Group 2", "isgroup": true, "options":
                [
                    {"name": "Item 3", "isgroup": false, "value": "3"},
                    {"name": "Item 4", "isgroup": false, "value": "4"}
                ]}],
            "disabled": false,
            "title": "Some cool title"
        }
    }
}}
<div class="container-fluid tertiary-navigation">
    <div class="d-flex">
        {{#addnewbutton}}
            <div class="navitem">
                {{> core/single_button }}
            </div>
        {{/addnewbutton}}

        <div class="d-flex ms-sm-auto">
            {{#tools}}
                {{#button}}
                    <div class="navitem">
                        {{> core/single_button}}
                    </div>
                {{/button}}
                {{#select}}
                    <div class="navitem">
                        <div class="dropdown">
                            <button type="button" class="btn btn-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                ...
                                <span class="visually-hidden">{{#str}} subscribepisodes, mod_pcast {{/str}}</span>
                            </button>
                            <div class="dropdown-menu dropdown-menu-end">
                                {{#options}}
                                    <a class="dropdown-item" href="{{url}}"
                                    {{#openinnewwindow}}target="_blank"{{/openinnewwindow}}>{{string}}</a>
                                {{/options}}
                            </div>
                        </div>
                    </div>
                {{/select}}
            {{/tools}}
        </div>
    </div>
    <div class="d-flex">
        {{#tabjumps}}
            <div class="navitem">
                {{> core/url_select }}
            </div>
        {{/tabjumps}}
    </div>
</div>