import extendType from './_extendType';
import number from './number';
import { defineMessage } from 'react-intl';
export default extendType(number, function (_ref) {
  var config = _ref.config;
  return function (props) {
    var _props$uiSchema;

    if (config.numberDefault === undefined || config.numberDefault > config.maximum || config.numberDefault < config.minimum) {
      var _config$minimum;

      props.schema["default"] = (_config$minimum = config.minimum) !== null && _config$minimum !== void 0 ? _config$minimum : 0;
    }

    (_props$uiSchema = props.uiSchema) !== null && _props$uiSchema !== void 0 ? _props$uiSchema : props.uiSchema = {};
    props.uiSchema['ui:widget'] = 'range';
  };
});
export var name = defineMessage({
  id: "Lop88a",
  defaultMessage: [{
    "type": 0,
    "value": "Liukusäädin"
  }]
});
export var elementType = 'field';
export var scaleTypes = [{
  value: 'noScale',
  message: defineMessage({
    id: "IED1vq",
    defaultMessage: [{
      "type": 0,
      "value": "Ei asteikkoa"
    }]
  })
}, {
  value: 'automaticScale',
  message: defineMessage({
    id: "7suTBl",
    defaultMessage: [{
      "type": 0,
      "value": "Automaattinen asteikko"
    }]
  })
}, {
  value: 'customScale',
  message: defineMessage({
    id: "17f1+3",
    defaultMessage: [{
      "type": 0,
      "value": "Määrittele oma asteikko"
    }]
  })
}];
//# sourceMappingURL=range.js.map