/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */

/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */

/* eslint-disable import/no-mutable-exports */
import deprecatedProperty from '../../utilities/warning/deprecated-property';
import deprecatedPropertyValue from '../../utilities/warning/deprecated-property-value';
import isTriggerTabbable from '../../utilities/warning/is-trigger-tabbable';
import getComponentDocFn from '../../utilities/get-component-doc';

var checkProps = function checkProps() {};

if (process.env.NODE_ENV !== 'production') {
  checkProps = function checkProps(COMPONENT, props, jsonDoc) {
    var createDocUrl = getComponentDocFn(jsonDoc);

    if (props.variant === 'base') {
      isTriggerTabbable(COMPONENT, props.children, createDocUrl());
    } // Deprecated and changed to another property


    deprecatedPropertyValue(COMPONENT, {
      propAsString: 'variant',
      propValue: props.variant,
      deprecatedPropValue: 'info',
      replacementPropAsString: 'theme',
      replacementPropAsValue: 'info'
    }, createDocUrl('theme'));
    deprecatedPropertyValue(COMPONENT, {
      propAsString: 'variant',
      propValue: props.variant,
      deprecatedPropValue: 'error',
      replacementPropAsString: 'theme',
      replacementPropAsValue: 'error'
    }, createDocUrl('theme'));
    deprecatedProperty(COMPONENT, props.openByDefault, 'openByDefault', 'isOpen', createDocUrl('isOpen'));
    deprecatedProperty(COMPONENT, props.target, 'target', undefined, "A new positioning library is being implmented under the hood. Please trigger tooltips to appear on their triggers with `isOpen` and not on other DOM elements. ".concat(createDocUrl('isOpen')) // eslint-disable-line max-len
    );
    deprecatedProperty(COMPONENT, props.isInline, 'isInline', 'position="relative"', createDocUrl('position'));
  };
}

export default checkProps;
//# sourceMappingURL=check-props.js.map