// Copyright (C) 2023 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import m from 'mithril';
import {classNames} from '../base/classnames';

interface SpinnerAttrs {
  // Whether to use an ease-in-ease-out animation rather than a linear one.
  // Defaults to false.
  easing?: boolean;
  // Additional space separated classnames.
  className?: string;
}

export class Spinner implements m.ClassComponent<SpinnerAttrs> {
  view({attrs}: m.Vnode<SpinnerAttrs, this>): void | m.Children {
    const {easing = false, className} = attrs;
    const classes = classNames(easing && 'easing', className);
    return m('.pf-spinner', {class: classes});
  }
}
