<%@ page language="VB" masterpagefile="~/Template/Master.master" autoeventwireup="false" inherits="HelpDesk_TicketRules, MachSol.MachPanel.Web" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CPH_Content" Runat="Server">
    
    <script type="module">

        import { createApp } from 'vue'
        import TicketRules from '/Components/HelpDesk/TicketRules.js?v=3.9'
        import { getLabelText } from '/Components/Common/utils.js?v=3.9'

        createApp({
            data() {
                return {
                    readOnly: <%= Helper.ReadOnlyRole %>,
                    sortPreference: <%= Newtonsoft.Json.JsonConvert.SerializeObject(InitialSortPreference) %>,
                }
            },
            methods: {
                getLabelText,
            },
            created: function () {
                let urlParams = new URLSearchParams(window.location.search);

                if (urlParams.has('Su')) {
                    displaySuccessMsg(this.getLabelText('EGN0000011'));
                }
            },
            components: {
                TicketRules
            },
            template: `
<TicketRules :readOnly="readOnly" :sortPreference="sortPreference" />
`
        }).mount('#app')

    </script>

    <div id="app">
    </div>

</asp:Content>
