{#
Basic button style.
While technically both icon and text are optional, one of them should be given.
Otherwise, button renders out as a blank thing.
@opt bool block Whether or not to render button with Bootstrap "block" style
@opt bool blockxs Whether or not to render button with Bootstrap "blockxs" style
@opt string form Form button type, if needed (like "submit")
@opt string helper Bootstrap-based class for coloring the button
@opt string htmlClass Extra CSS classes to append to button class attribute
@opt string htmlId Value to use for element's ID attribute; if NULL attribute is not rendered
@opt string htmlTag The HTML tag name to use for the element.
@opt string icon The FontAwesome icon name to use, if NULL icon chunk is not rendered
@opt string link Used as the HREF attribute on the link
@opt string isLink Choose link or not
@opt string size The Bootstrap-based button sizing name
@opt string text Primary text to use for the link, if NULL text chunk is not rendered
#}
{% set block = _args.block|default(false) %}
{% set blockxs = _args.blockxs|default(false) %}
{% set blocksm = _args.blocksm|default(false) %}
{% set stroke = _args.stroke|default(false) %}
{% set form = _args.form|default(null) %}
{% set helper = _args.helper|default('default') %}
{% set htmlClass = _args.htmlClass|default(null) %}
{% set htmlId = _args.htmlId|default(null) %}
{% set htmlTag = _args.htmlTag|default('a') %}
{% set icon = _args.icon|default(null) %}
{% set iconCustom = _args.iconCustom|default(null) %}
{% set link = _args.link|default('#') %}
{% set isLink = _args.isLink is defined ? _args.isLink : true %}
{% set sronly = _args.sronly is defined ? _args.sronly : false %}
{% set modal = _args.modal|default(null) %}
{% set size = _args.size|default(null) %}
{% set text = _args.text|default(null) %}
{% set dataAttrs = _args.dataAttrs|default(null) %}
{% set formaction = _args.formaction|default(null) %}
{% set helpText = _args.helpText|default(null) %}
<{{ htmlTag }}{% if form is not null %} type="{{ form }}"{% endif %}{% if htmlId is not null %} id="{{ htmlId }}"{% endif %} class="btn btn-{{ helper }}{% if size is not null %} btn-{{ size }}{% endif %}{% if block %} btn-block{% endif %}{% if blockxs %} btn-block-xs{% endif %}{% if blocksm %} btn-block-sm{% endif %}{% if stroke %} btn-stroke{% endif %}{% if htmlClass is not null %} {{ htmlClass }}{% endif %}" {% if isLink %}href="{{ link }}"{% endif %}{% if modal is not null %} data-toggle="modal" data-target="{{ modal }}"{% endif %}{% if dataAttrs is not empty %} {{ dataAttrs|raw }}{% endif %}{% if formaction is not empty %} formaction="{{ formaction|escape('html_attr') }}"{% endif %} {% if helpText is not null %}data-placement='right' data-trigger='hover' data-toggle='tooltip' data-original-title="{{ helpText }}"{% endif %}>
{% if icon is not empty %}
<i class="fa fa-{{ icon }}"></i>
{% endif %}
{% if iconCustom is not empty %}
<i class="csi {{ iconCustom }}"></i>
{% endif %}
{% if text is not empty %}
{% if sronly is not same as(true) %}
<span>{{ text|trans }}</span>
{% else %}
<span class="sr-only">{{ text|trans }}</span>
{% endif %}
{% endif %}
</{{ htmlTag }}>