<commit_before># Alert

In order to use the alert custom element you need to import the element in the document's head:
```html
<script src="joomla-alert.min.js"></script>
```

The simplified version of the custom elements
```html
<joomla-alert>No params passed</joomla-alert>

<joomla-alert level="info" dismiss="true">
    <strong>Heads up!</strong> This alert needs your attention, but it's not super important.
</joomla-alert>

<joomla-alert level="success" acknowledge="true">
    <strong>Well done!</strong> You successfully read this important alert message.
</joomla-alert>

<joomla-alert level="warning" dismiss="true" auto-dismiss="10000">
    <strong>Warning!</strong> This one will self distruct in 10secs.
</joomla-alert>

<joomla-alert level="danger" href="https://www.joomla.org/">
    <strong>Oh snap!</strong> Click open to go to Google.com
</joomla-alert>
```

### Alerts demo:
<joomla-alert>No params passed</joomla-alert>
<joomla-alert level="info" dismiss="true">
    <strong>Heads up!</strong> This alert needs your attention, but it's not super important.
</joomla-alert>
<joomla-alert level="success" acknowledge="true">
    <strong>Well done!</strong> You successfully read this important alert message.
</joomla-alert>
<joomla-alert level="warning" dismiss="true" auto-dismiss="10000">
    <strong>Warning!</strong> This one will self distruct in 10secs.
</joomla-alert>
<joomla-alert level="danger" href="https://www.joomla.org/">
    <strong>Oh snap!</strong> Click open to go to Google.com
</joomla-alert>

## Attibutes
Control the design and functionality of the custom element through attributes.


|Attribute			|Description								     			|
|-----------------------|-----------------------------------------------------------------------------------------------|
|level		|This attribute is responsible for the looks. Possible values: info, success, warning and danger				|
|dismiss	|Appends the x button. True is the only value.|
|acknowledge	|Appends a generic button with a title `Ok`. True is the only value.|
|auto-dismiss	|Controls the auto close functionality of the alert. Values (integers) represent milliseconds|
|href	|if is set a redirect button is created. Value must be an actual url|

All Strings are translateble, using the common API: `Joomla.JText._('JCLOSE')`


## Dismissing
No need for extra javascript, it’s possible to dismiss any alert inline. Here’s how:

Add a `dismiss` or an `acknowledge` attribute
That's it!!!
Now clicking the x button will close the alert!!!

## JavaScript behavior
### Triggers
<commit_msg>remove google.com as that is not where the link was pointing<commit_after># Alert

In order to use the alert custom element you need to import the element in the document's head:
```html
<script src="joomla-alert.min.js"></script>
```

The simplified version of the custom elements
```html
<joomla-alert>No params passed</joomla-alert>

<joomla-alert level="info" dismiss="true">
    <strong>Heads up!</strong> This alert needs your attention, but it's not super important.
</joomla-alert>

<joomla-alert level="success" acknowledge="true">
    <strong>Well done!</strong> You successfully read this important alert message.
</joomla-alert>

<joomla-alert level="warning" dismiss="true" auto-dismiss="10000">
    <strong>Warning!</strong> This one will self distruct in 10secs.
</joomla-alert>

<joomla-alert level="danger" href="https://www.joomla.org/">
    <strong>Oh snap!</strong> Click open to go to joomla.org
</joomla-alert>
```

### Alerts demo:
<joomla-alert>No params passed</joomla-alert>
<joomla-alert level="info" dismiss="true">
    <strong>Heads up!</strong> This alert needs your attention, but it's not super important.
</joomla-alert>
<joomla-alert level="success" acknowledge="true">
    <strong>Well done!</strong> You successfully read this important alert message.
</joomla-alert>
<joomla-alert level="warning" dismiss="true" auto-dismiss="10000">
    <strong>Warning!</strong> This one will self distruct in 10secs.
</joomla-alert>
<joomla-alert level="danger" href="https://www.joomla.org/">
    <strong>Oh snap!</strong> Click open to go to joomla.org
</joomla-alert>

## Attibutes
Control the design and functionality of the custom element through attributes.


|Attribute			|Description								     			|
|-----------------------|-----------------------------------------------------------------------------------------------|
|level		|This attribute is responsible for the looks. Possible values: info, success, warning and danger				|
|dismiss	|Appends the x button. True is the only value.|
|acknowledge	|Appends a generic button with a title `Ok`. True is the only value.|
|auto-dismiss	|Controls the auto close functionality of the alert. Values (integers) represent milliseconds|
|href	|if is set a redirect button is created. Value must be an actual url|

All Strings are translateble, using the common API: `Joomla.JText._('JCLOSE')`


## Dismissing
No need for extra javascript, it’s possible to dismiss any alert inline. Here’s how:

Add a `dismiss` or an `acknowledge` attribute
That's it!!!
Now clicking the x button will close the alert!!!

## JavaScript behavior
### Triggers

{'fraction_non_alphanumeric': 0.1625216888374783, 'fraction_numerical': 0.005398110661268556, 'mean_word_length': 3.724954462659381, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 79, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, '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': '4757897', 'n_tokens_mistral': 1605, 'n_tokens_neox': 1494, 'n_words': 556}