var _excluded = ["data"];

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

import React from 'react';
import Button from './Button';
import { NextIcon } from '../Icons';
import Spinner from '../Spinner/Spinner';
export default {
  title: 'Components/Button',
  component: Button,
  argTypes: {
    // children can be text or a ReactNode. For storybook controls, just allowing strings
    children: {
      control: {
        type: 'text'
      },
      type: {
        name: 'string',
        required: true
      }
    },
    disabled: {
      control: {
        type: 'boolean'
      }
    },
    // hiding deprecated props
    inverse: {
      table: {
        disable: true
      }
    },
    component: {
      table: {
        disable: true
      }
    },
    // hiding deprecated opts
    variation: {
      options: ['primary', 'success', 'transparent']
    }
  },
  args: {
    children: 'Your button text here'
  }
};

var Template = function Template(_ref) {
  var data = _ref.data,
      args = _objectWithoutProperties(_ref, _excluded);

  return /*#__PURE__*/React.createElement(Button, args);
};

export var DefaultButton = Template.bind({});
export var InverseButton = Template.bind({});
InverseButton.args = {
  inversed: true
};
InverseButton.parameters = {
  backgrounds: {
    default: process.env.STORYBOOK_DS === 'medicare' ? 'Mgov dark' : 'Hcgov dark'
  }
};
export var IconButton = Template.bind({});
IconButton.args = {
  children: /*#__PURE__*/React.createElement(React.Fragment, null, "Button with icon ", /*#__PURE__*/React.createElement(NextIcon, null), ' ')
};
export var SpinnerButton = Template.bind({});
SpinnerButton.args = {
  children: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Spinner, null), " Loading..."),
  variation: 'primary'
};
export var LinkButton = Template.bind({});
LinkButton.args = {
  href: 'javascript:void(0);'
};
LinkButton.parameters = {
  loki: {
    skip: true
  }
};