{"version":3,"file":"useUniqueId.cjs","names":["_react","require","_createUniqueId","useUniqueId","id","uniqueId","useMemo","createUniqueId","exports"],"sources":["../../src/useUniqueId.ts"],"sourcesContent":["/*!\n * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { useMemo } from \"react\";\n\nimport { createUniqueId } from \"./createUniqueId.js\";\n\nexport const useUniqueId = (id?: string) => {\n  const uniqueId = useMemo(() => createUniqueId(), []);\n\n  return id ?? uniqueId;\n};\n"],"mappings":";;;;;;AAYA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AAdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMO,MAAME,WAAW,GAAIC,EAAW,IAAK;EAC1C,MAAMC,QAAQ,GAAG,IAAAC,cAAO,EAAC,MAAM,IAAAC,8BAAc,EAAC,CAAC,EAAE,EAAE,CAAC;EAEpD,OAAOH,EAAE,IAAIC,QAAQ;AACvB,CAAC;AAACG,OAAA,CAAAL,WAAA,GAAAA,WAAA","ignoreList":[]}