import _styled from "styled-components";
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
import React from 'react';
import { css } from 'styled-components';
import { IconSearch } from '@defencedigital/icon-library';
import { TextInput } from '.';
export default {
  argTypes: {
    endAdornment: {
      control: false
    },
    startAdornment: {
      control: false
    }
  },
  component: TextInput,
  title: 'Text Input',
  parameters: {
    argTypes: {
      onBlur: {
        action: 'onBlur'
      }
    }
  }
};
export var Default = function Default(props) {
  return /*#__PURE__*/React.createElement(TextInput, props);
};
Default.args = {
  name: 'text-input-default',
  label: 'Example label'
};
export var Disabled = function Disabled(props) {
  return /*#__PURE__*/React.createElement(TextInput, _extends({}, props, {
    name: "text-input-disabled",
    label: "Example label",
    isDisabled: true
  }));
};
Disabled.storyName = 'Disabled';
export var WithStartAdornment = function WithStartAdornment(props) {
  return /*#__PURE__*/React.createElement(TextInput, _extends({}, props, {
    name: "text-input-start-adornment",
    label: "Example label",
    startAdornment: /*#__PURE__*/React.createElement(IconSearch, null)
  }));
};
WithStartAdornment.storyName = 'With start adornment';
export var WithEndAdornment = function WithEndAdornment(props) {
  return /*#__PURE__*/React.createElement(TextInput, _extends({}, props, {
    name: "text-input-end-adornment",
    label: "Example label",
    endAdornment: /*#__PURE__*/React.createElement(IconSearch, null)
  }));
};
WithEndAdornment.storyName = 'With end adornment';
export var WithError = function WithError(props) {
  return /*#__PURE__*/React.createElement(TextInput, _extends({}, props, {
    isInvalid: true,
    label: "Example label",
    name: "text-input-end-adornment"
  }));
};
WithError.storyName = 'With error';
export var WithLongLabel = function WithLongLabel(props) {
  return /*#__PURE__*/React.createElement(_StyledDiv, null, /*#__PURE__*/React.createElement(TextInput, _extends({}, props, {
    label: "This text input has a long label that doesn't fit in the container",
    name: "text-input-long-label"
  })));
};
WithLongLabel.storyName = 'With long label';
var _StyledDiv = _styled("div").withConfig({
  displayName: "TextInputstories___StyledDiv",
  componentId: "sc-h0zyee-0"
})(["max-width:400px;"]);