import*as React from"react";import{getTodayTime,getTodayTimeStr,isAllowedDate}from"../util/";export default function TodayButton(e){var t=e.prefixCls,a=e.locale,o=e.value,l=e.timePicker,d=e.disabled,i=e.disabledDate,r=e.onToday,n=e.text,m=(!n&&l?a.now:n)||a.today,T=i&&!isAllowedDate(getTodayTime(o),i,null)||d,c=T?t+"-today-btn-disabled":"";return React.createElement("a",{className:t+"-today-btn "+c,role:"button",onClick:T?null:r,title:getTodayTimeStr(o)},m)};