import template from './ws-card-loading-indicator.tmpl.html';
import wsCardLoadingIndicatorController from './ws-card-loading-indicator.controller';

const wsCardLoadingIndicatorComponent = {
  template,
  transclude: true,
  controller: wsCardLoadingIndicatorController,
  bindings: {
     /* When 'ready' is defined, the loading indicator will halt and show the transcluded content.
      * When 'ready' is undefined, the loading indicator will be shown and
      * hide the transcluded content.
      * When 'ready' is equal to 'error',
      * it displays a friendly generic catch-call error message. */
    ready: '<',
    // Includes logo when set to true
    withLogo: '<',
    // Gets rid of the card background when set to true
    noCardBackground: '<',
    // Sets the minimum height of the loading indicator
    minHeight: '@',
     // Forces an artificial delay if content is not being loaded asynchronously.
    delay: '<',
    /* Use the gray version for branding-agnostic loader.
     * Used when loading white label styles for w4a */
    gray: '<',
    /* By default, this component will block loading using ng-if.
     * If you want hidden content to be rendered behind the scenes, add non-blocking="true" */
    nonBlocking: '<',
    // The error message displayed when ready is 'error'
    errorMessage: '@',
  },
};

export default wsCardLoadingIndicatorComponent;
