{"size": 2597, "ext": "js", "max_stars_repo_path": "css/src/c3runtime/actions.js", "max_stars_repo_name": "el3um4s/construct-plugins-and-addons", "max_stars_repo_stars_event_min_datetime": "2020-02-23T21:14:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-28T16:45:31.000Z", "max_issues_repo_path": "css/src/c3runtime/actions.js", "max_issues_repo_name": "el3um4s/construct-plugins-and-addons", "max_issues_repo_issues_event_min_datetime": "2020-02-22T13:23:22.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-31T14:20:43.000Z", "max_forks_repo_path": "css/src/c3runtime/actions.js", "max_forks_repo_name": "el3um4s/construct-plugins-and-addons", "max_forks_repo_forks_event_min_datetime": "2021-08-23T00:31:15.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-23T00:31:15.000Z"}
{"max_stars_count": 8, "max_issues_count": 12, "max_forks_count": 1, "avg_line_length": 25.213592233, "max_line_length": 95, "alphanum_fraction": 0.4940315749}
"use strict";
{
    self.C3.Plugins.StraniAnelli_InjectCSS_v2.Acts = {
        async AddCss()
        {
            this._action = "ADD";

            if ( !! this._isLocal)
            {
                this._url = await this._runtime.GetAssetManager().GetProjectFileUrl(this._css);
            }
            else
            {
                this._url = this._css;
            }

            this.UpdateElementState();
        },

        async DeleteCss()
        {
            this._action = "DELETE";

            if ( !! this._isLocal)
            {
                this._url = await this._runtime.GetAssetManager().GetProjectFileUrl(this._css);
            }
            else
            {
                this._url = this._css;
            }

            this.UpdateElementState();
        },

        async ChangeCss(newCss, isLocalCss)
        {
            this._action = "CHANGE";
            this._css = newCss;
            this._isLocal = isLocalCss;

            if ( !! this._isLocal)
            {
                this._url = await this._runtime.GetAssetManager().GetProjectFileUrl(this._css);
            }
            else
            {
                this._url = this._css;
            }


            this.UpdateElementState();
        },

        async AddClass(selector, classe)
        {
            this._action = "CLASS";

            this._class_action = "ADD";
            this._class_selector = selector;
            this._class_options_first = classe;
            this._class_options_second = classe;

            this.UpdateElementState();
        },

        async RemoveClass(selector, classe)
        {
            this._action = "CLASS";

            this._class_action = "REMOVE";
            this._class_selector = selector;
            this._class_options_first = classe;
            this._class_options_second = classe;

            this.UpdateElementState();
        },

        async ToggleClass(selector, classe)
        {
            this._action = "CLASS";

            this._class_action = "TOGGLE";
            this._class_selector = selector;
            this._class_options_first = classe;
            this._class_options_second = classe;

            this.UpdateElementState();
        },

        async ReplaceClass(selector, oldclasse, newclasse)
        {
            this._action = "CLASS";

            this._class_action = "REPLACE";
            this._class_selector = selector;
            this._class_options_first = oldclasse;
            this._class_options_second = newclasse;

            this.UpdateElementState();
        }
    };
}