{"ast":null,"code":"import propsToAriaRole from \"./propsToAriaRole\";\nvar roleComponents = {\n  article: 'article',\n  banner: 'header',\n  complementary: 'aside',\n  contentinfo: 'footer',\n  form: 'form',\n  link: 'a',\n  list: 'ul',\n  listitem: 'li',\n  main: 'main',\n  navigation: 'nav',\n  region: 'section'\n};\nvar emptyObject = {};\n\nvar propsToAccessibilityComponent = function propsToAccessibilityComponent(props) {\n  if (props === void 0) {\n    props = emptyObject;\n  }\n\n  if (props.accessibilityRole === 'label') {\n    return 'label';\n  }\n\n  var role = propsToAriaRole(props);\n\n  if (role) {\n    if (role === 'heading') {\n      var level = props['aria-level'];\n\n      if (level != null) {\n        return \"h\" + level;\n      }\n\n      return 'h1';\n    }\n\n    return roleComponents[role];\n  }\n};\n\nexport default propsToAccessibilityComponent;","map":{"version":3,"sources":["/Users/nishan/Desktop/oss/responsive-breakpoints/example/node_modules/react-native-web/dist/modules/AccessibilityUtil/propsToAccessibilityComponent.js"],"names":["propsToAriaRole","roleComponents","article","banner","complementary","contentinfo","form","link","list","listitem","main","navigation","region","emptyObject","propsToAccessibilityComponent","props","accessibilityRole","role","level"],"mappings":"AAQA,OAAOA,eAAP;AACA,IAAIC,cAAc,GAAG;AACnBC,EAAAA,OAAO,EAAE,SADU;AAEnBC,EAAAA,MAAM,EAAE,QAFW;AAGnBC,EAAAA,aAAa,EAAE,OAHI;AAInBC,EAAAA,WAAW,EAAE,QAJM;AAKnBC,EAAAA,IAAI,EAAE,MALa;AAMnBC,EAAAA,IAAI,EAAE,GANa;AAOnBC,EAAAA,IAAI,EAAE,IAPa;AAQnBC,EAAAA,QAAQ,EAAE,IARS;AASnBC,EAAAA,IAAI,EAAE,MATa;AAUnBC,EAAAA,UAAU,EAAE,KAVO;AAWnBC,EAAAA,MAAM,EAAE;AAXW,CAArB;AAaA,IAAIC,WAAW,GAAG,EAAlB;;AAEA,IAAIC,6BAA6B,GAAG,SAASA,6BAAT,CAAuCC,KAAvC,EAA8C;AAChF,MAAIA,KAAK,KAAK,KAAK,CAAnB,EAAsB;AACpBA,IAAAA,KAAK,GAAGF,WAAR;AACD;;AAGD,MAAIE,KAAK,CAACC,iBAAN,KAA4B,OAAhC,EAAyC;AACvC,WAAO,OAAP;AACD;;AAED,MAAIC,IAAI,GAAGjB,eAAe,CAACe,KAAD,CAA1B;;AAEA,MAAIE,IAAJ,EAAU;AACR,QAAIA,IAAI,KAAK,SAAb,EAAwB;AACtB,UAAIC,KAAK,GAAGH,KAAK,CAAC,YAAD,CAAjB;;AAEA,UAAIG,KAAK,IAAI,IAAb,EAAmB;AACjB,eAAO,MAAMA,KAAb;AACD;;AAED,aAAO,IAAP;AACD;;AAED,WAAOjB,cAAc,CAACgB,IAAD,CAArB;AACD;AACF,CAzBD;;AA2BA,eAAeH,6BAAf","sourcesContent":["/**\n * Copyright (c) Nicolas Gallagher.\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 propsToAriaRole from './propsToAriaRole';\nvar roleComponents = {\n  article: 'article',\n  banner: 'header',\n  complementary: 'aside',\n  contentinfo: 'footer',\n  form: 'form',\n  link: 'a',\n  list: 'ul',\n  listitem: 'li',\n  main: 'main',\n  navigation: 'nav',\n  region: 'section'\n};\nvar emptyObject = {};\n\nvar propsToAccessibilityComponent = function propsToAccessibilityComponent(props) {\n  if (props === void 0) {\n    props = emptyObject;\n  }\n\n  // special-case for \"label\" role which doesn't map to an ARIA role\n  if (props.accessibilityRole === 'label') {\n    return 'label';\n  }\n\n  var role = propsToAriaRole(props);\n\n  if (role) {\n    if (role === 'heading') {\n      var level = props['aria-level'];\n\n      if (level != null) {\n        return \"h\" + level;\n      }\n\n      return 'h1';\n    }\n\n    return roleComponents[role];\n  }\n};\n\nexport default propsToAccessibilityComponent;"]},"metadata":{},"sourceType":"module"}