{"ast":null,"code":"import UIManager from \"../../exports/UIManager\";\nvar TextInputState = {\n  _currentlyFocusedNode: null,\n  currentlyFocusedField: function currentlyFocusedField() {\n    if (document.activeElement !== this._currentlyFocusedNode) {\n      this._currentlyFocusedNode = null;\n    }\n\n    return this._currentlyFocusedNode;\n  },\n  focusTextInput: function focusTextInput(textFieldNode) {\n    if (textFieldNode !== null) {\n      this._currentlyFocusedNode = textFieldNode;\n\n      if (document.activeElement !== textFieldNode) {\n        UIManager.focus(textFieldNode);\n      }\n    }\n  },\n  blurTextInput: function blurTextInput(textFieldNode) {\n    if (textFieldNode !== null) {\n      this._currentlyFocusedNode = null;\n\n      if (document.activeElement === textFieldNode) {\n        UIManager.blur(textFieldNode);\n      }\n    }\n  }\n};\nexport default TextInputState;","map":{"version":3,"sources":["/Users/nishan/Desktop/oss/responsive-breakpoints/example/node_modules/react-native-web/dist/modules/TextInputState/index.js"],"names":["UIManager","TextInputState","_currentlyFocusedNode","currentlyFocusedField","document","activeElement","focusTextInput","textFieldNode","focus","blurTextInput","blur"],"mappings":"AASA,OAAOA,SAAP;AAOA,IAAIC,cAAc,GAAG;AAInBC,EAAAA,qBAAqB,EAAE,IAJJ;AAUnBC,EAAAA,qBAAqB,EAAE,SAASA,qBAAT,GAAiC;AACtD,QAAIC,QAAQ,CAACC,aAAT,KAA2B,KAAKH,qBAApC,EAA2D;AACzD,WAAKA,qBAAL,GAA6B,IAA7B;AACD;;AAED,WAAO,KAAKA,qBAAZ;AACD,GAhBkB;AAuBnBI,EAAAA,cAAc,EAAE,SAASA,cAAT,CAAwBC,aAAxB,EAAuC;AACrD,QAAIA,aAAa,KAAK,IAAtB,EAA4B;AAC1B,WAAKL,qBAAL,GAA6BK,aAA7B;;AAEA,UAAIH,QAAQ,CAACC,aAAT,KAA2BE,aAA/B,EAA8C;AAC5CP,QAAAA,SAAS,CAACQ,KAAV,CAAgBD,aAAhB;AACD;AACF;AACF,GA/BkB;AAsCnBE,EAAAA,aAAa,EAAE,SAASA,aAAT,CAAuBF,aAAvB,EAAsC;AACnD,QAAIA,aAAa,KAAK,IAAtB,EAA4B;AAC1B,WAAKL,qBAAL,GAA6B,IAA7B;;AAEA,UAAIE,QAAQ,CAACC,aAAT,KAA2BE,aAA/B,EAA8C;AAC5CP,QAAAA,SAAS,CAACU,IAAV,CAAeH,aAAf;AACD;AACF;AACF;AA9CkB,CAArB;AAgDA,eAAeN,cAAf","sourcesContent":["/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport UIManager from '../../exports/UIManager';\n/**\n * This class is responsible for coordinating the \"focused\"\n * state for TextInputs. All calls relating to the keyboard\n * should be funneled through here\n */\n\nvar TextInputState = {\n  /**\n   * Internal state\n   */\n  _currentlyFocusedNode: null,\n\n  /**\n   * Returns the ID of the currently focused text field, if one exists\n   * If no text field is focused it returns null\n   */\n  currentlyFocusedField: function currentlyFocusedField() {\n    if (document.activeElement !== this._currentlyFocusedNode) {\n      this._currentlyFocusedNode = null;\n    }\n\n    return this._currentlyFocusedNode;\n  },\n\n  /**\n   * @param {Object} TextInputID id of the text field to focus\n   * Focuses the specified text field\n   * noop if the text field was already focused\n   */\n  focusTextInput: function focusTextInput(textFieldNode) {\n    if (textFieldNode !== null) {\n      this._currentlyFocusedNode = textFieldNode;\n\n      if (document.activeElement !== textFieldNode) {\n        UIManager.focus(textFieldNode);\n      }\n    }\n  },\n\n  /**\n   * @param {Object} textFieldNode id of the text field to focus\n   * Unfocuses the specified text field\n   * noop if it wasn't focused\n   */\n  blurTextInput: function blurTextInput(textFieldNode) {\n    if (textFieldNode !== null) {\n      this._currentlyFocusedNode = null;\n\n      if (document.activeElement === textFieldNode) {\n        UIManager.blur(textFieldNode);\n      }\n    }\n  }\n};\nexport default TextInputState;"]},"metadata":{},"sourceType":"module"}