<commit_before>using System.Linq;
using static HtmlHelper.Helpers;

namespace HtmlHelper.Bootstrap
{
    public enum AlertType
    {
        Success,
        Info,
        Warning,
        Danger
    }

    public class Alert : Div
    {
        public Alert(AlertType type, params BodyElement[] content) : base(content)
        {
            this.Class("alert");
            this.Class("alert-" + type.ToString().ToLower());
            this.Attr("role", "alert");

            // add alert-link class to all links
            content.Where(x => x is Anchor).ToList()
                .ForEach(x => ((Anchor)x).Class("alert-link"));
        }
    }

    public class DismissibleAlert : Alert
    {
        public DismissibleAlert(AlertType type, params BodyElement[] content) : base(type, content)
        {
                this.Class("alert-dismissible");
                this.Class("fade");
                this.Class("show");

                var closeButton = Button(Span("&times;").Attr("aria-hidden", "true"));
                closeButton.Class("close");
                closeButton.Attr("data-dismiss", "alert");
                closeButton.Attr("aria-label", "Close");

                Content.Insert(0, closeButton);
        }
    }

    public static partial class Helpers
    {
        public static Alert Alert(AlertType type, params BodyElement[] content)
        {
            return new Alert(type, content);
        }

        public static DismissibleAlert DismissibleAlert(AlertType type, params BodyElement[] content)
        {
            return new DismissibleAlert(type, content);
        }
    }
}<commit_msg>cleanup<commit_after>using System.Linq;
using static HtmlHelper.Helpers;

namespace HtmlHelper.Bootstrap
{
    public enum AlertType
    {
        Success,
        Info,
        Warning,
        Danger
    }

    public class Alert : Div
    {
        public Alert(AlertType type, params BodyElement[] content) : base(content)
        {
            this.Class("alert");
            this.Class("alert-" + type.ToString().ToLower());
            this.Attr("role", "alert");

            // add alert-link class to all links
            content.Where(x => x is Anchor).ToList()
                .ForEach(x => ((Anchor)x).Class("alert-link"));
        }
    }

    public class DismissibleAlert : Alert
    {
        public DismissibleAlert(AlertType type, params BodyElement[] content) : base(type, content)
        {
            this.Class("alert-dismissible");
            this.Class("fade");
            this.Class("show");

            Content.Insert(0, Button(Span("&times;").Attr("aria-hidden", "true"))
                .Class("close")
                .Attr("data-dismiss", "alert")
                .Attr("aria-label", "Close"));
        }
    }

    public static partial class Helpers
    {
        public static Alert Alert(AlertType type, params BodyElement[] content)
        {
            return new Alert(type, content);
        }

        public static DismissibleAlert DismissibleAlert(AlertType type, params BodyElement[] content)
        {
            return new DismissibleAlert(type, content);
        }
    }
}
{'fraction_non_alphanumeric': 0.11937935402153262, 'fraction_numerical': 0.0006333122229259025, 'mean_word_length': 1.8928571428571428, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5602874', 'n_tokens_mistral': 870, 'n_tokens_neox': 812, 'n_words': 191}