{% set holidayfrom=config('DmitsShippingCountdown.config.holidayfrom')|date('00:00:01 d.m.Y',"UTC") %}
{% set holidaytill=config('DmitsShippingCountdown.config.holidaytill')|date('23:59:59 d.m.Y',"UTC") %}
{% if config('DmitsShippingCountdown.config.holidayfrom') and
config('DmitsShippingCountdown.config.holidaytill')and
holidayfrom|date('U')-now|date('U')<0 and holidaytill|date('U')-now|date('U')>0%}
<div class="dmits_holiday"
style="
{% if config('DmitsShippingCountdown.config.holidaytextcolor') %} color:{{config('DmitsShippingCountdown.config.holidaytextcolor')}}; {% endif %}
{% if config('DmitsShippingCountdown.config.holidaybackgroundcolor') %} background-color:{{config('DmitsShippingCountdown.config.holidaybackgroundcolor')}}; {% endif %}
{% if config('DmitsShippingCountdown.config.holidaybordercolor') %} border: 1px solid {{config('DmitsShippingCountdown.config.holidaybordercolor')}}; {% endif %}
{% if config('DmitsShippingCountdown.config.holidaypadding') %} padding:{{config('DmitsShippingCountdown.config.holidaypadding')}}px; {% endif %}
{% if config('DmitsShippingCountdown.config.holidaymargin') %} margin:{{config('DmitsShippingCountdown.config.holidaymargin')}}px; {% endif %}
{% if config('DmitsShippingCountdown.config.holidayborderradius') %} border-radius:{{config('DmitsShippingCountdown.config.holidayborderradius')}}px; {% endif %}
{% if config('DmitsShippingCountdown.config.holidaytextfamily') %} font-family:{{config('DmitsShippingCountdown.config.holidaytextfamily')}}; {% endif %}
{% if config('DmitsShippingCountdown.config.holidaytextsize') %} font-size:{{config('DmitsShippingCountdown.config.holidaytextsize')}}px; {% endif %}
{% if config('DmitsShippingCountdown.config.holidaycss') %} {{config('DmitsShippingCountdown.config.holidaycss')}}; {% endif %}
">{{"dmits.shippingcountdown.custom.holidaytext"|trans|raw}}</div>
{% else %}
{% if DmitsShippingCountdownBlock=="header" or (DmitsShippingCountdownBlock=="buy-widget" and
DmitsShippingCountdownItem.availableStock >= DmitsShippingCountdownItem.minPurchase and DmitsShippingCountdownItem.deliveryTime
and (config('DmitsShippingCountdown.config.delivertime')=="" or (config('DmitsShippingCountdown.config.delivertime')==DmitsShippingCountdownItem.deliveryTime.id))
and DmitsShippingCountdownItem.customFields.dmits_shippingcountdown_deactive!=true
)
or (DmitsShippingCountdownBlock=="cart" and
DmitsShippingCountdownItem.deliveryInformation.stock >= DmitsShippingCountdownItem.quantityInformation.minPurchase and DmitsShippingCountdownItem.deliveryInformation.deliveryTime
and DmitsShippingCountdownItem.payload.customFields.dmits_shippingcountdown_deactive!=true)
%}
<span class="dmits_time"
style="display: none;
{% if config('DmitsShippingCountdown.config.shippingtextcolor') %} color:{{config('DmitsShippingCountdown.config.shippingtextcolor')}}; {% endif %}
{% if config('DmitsShippingCountdown.config.shippingbackgroundcolor') %} background-color:{{config('DmitsShippingCountdown.config.shippingbackgroundcolor')}}; {% endif %}
{% if config('DmitsShippingCountdown.config.shippingbordercolor') %} border: 1px solid {{config('DmitsShippingCountdown.config.shippingbordercolor')}}; {% endif %}
{% if config('DmitsShippingCountdown.config.shippingpadding') %} padding:{{config('DmitsShippingCountdown.config.shippingpadding')}}px; {% endif %}
{% if config('DmitsShippingCountdown.config.shippingmargin') %} margin:{{config('DmitsShippingCountdown.config.shippingmargin')}}px; {% endif %}
{% if config('DmitsShippingCountdown.config.shippingborderradius') %} border-radius:{{config('DmitsShippingCountdown.config.shippingborderradius')}}px; {% endif %}
{% if config('DmitsShippingCountdown.config.shippingtextfamily') %} font-family:{{config('DmitsShippingCountdown.config.shippingtextfamily')}}; {% endif %}
{% if config('DmitsShippingCountdown.config.shippingtextsize') %} font-size:{{config('DmitsShippingCountdown.config.shippingtextsize')}}px; {% endif %}
{% if config('DmitsShippingCountdown.config.shippingcss') %} {{config('DmitsShippingCountdown.config.shippingcss')}}; {% endif %}
"></span>
{% endif %}
{% endif %}