!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={580:e=>{e.exports=require("prop-types")},6689:e=>{e.exports=require("react")}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,o),a.exports}(()=>{o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t}})(),(()=>{o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}})(),(()=>{o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var r={};return(()=>{o.r(r),o.d(r,{default:()=>i});var e=o(6689),t=o.n(e),n=o(580),a=o.n(n);const u="pTjbvR2PI3JIAfGGYR5C",d="BnU6_vcWc8sasL8roBPA",l="yREg1belHCLDAYYfAg77",c="mFp_9X3SzjgPNXRSXiFR",s=({event:e,isScheduled:o,nowUtc:r,addToSchedule:n,removeFromSchedule:a,enterClick:s,alwaysShowEnter:i})=>{const p=((e,t)=>{const o=t>e.end_date;return e.start_date-t<1&&!o})(e,r);let f=null,m=null,y=null;const b=(t,o)=>{t.preventDefault(),t.stopPropagation(),o(e)};return p||i?(f=`${c} enter`,m="fa-sign-in",y=e=>b(e,s)):a&&n&&o?(f=`${l} added`,m="fa-check",y=e=>b(e,a)):a&&n&&(f=`${d} add`,m="fa-plus",y=e=>b(e,n)),y?t().createElement("button",{className:`${u} ${f}`,onClick:y},t().createElement("i",{className:`fa ${m}`,"aria-hidden":"true"})):null};s.propTypes={event:a().object.isRequired,nowUtc:a().number.isRequired,isScheduled:a().bool.isRequired,enterClick:a().func.isRequired,addToSchedule:a().func,removeFromSchedule:a().func,alwaysShowEnter:a().bool},s.defaultProps={addToSchedule:null,removeFromSchedule:null,alwaysShowEnter:!1};const i=s})(),r})()));
//# sourceMappingURL=circle-button.js.map