{"version":3,"sources":["src/components/search/atomic-query-error/atomic-query-error.pcss?tag=atomic-query-error&encapsulation=shadow","src/components/search/atomic-query-error/atomic-query-error.tsx"],"names":["atomicQueryErrorCss","AtomicQueryError","[object Object]","hostRef","this","showMoreInfo","queryError","buildQueryError","bindings","engine","h","QueryErrorCommon","onShowMoreInfo","queryErrorState","setAriaLive","msg","ariaMessage","__decorate","InitializeBindings","BindStateToController","AriaLiveRegion"],"mappings":"6UAAA,MAAMA,EAAsB,w79BC0BfC,EAAgB,MAL7BC,YAAAC,aAaWC,KAAAC,aAAe,MAKjBH,aACLE,KAAKE,WAAaC,EAAgBH,KAAKI,SAASC,QAG3CP,SACL,OACEQ,EAACC,EAAgB,CACfH,SAAUJ,KAAKI,SACfI,eAAgB,IAAOR,KAAKC,aAAe,KAC3CQ,gBAAiBT,KAAKS,gBACtBC,YAAcC,GAASX,KAAKY,YAAcD,EAC1CV,aAAcD,KAAKC,iBAvBHY,EAAA,CAArBC,uCAGAC,EAAsB,qDAOvBF,EAAA,CADCG,EAAe","sourcesContent":["@import '../../../global/global.pcss';\n","import {QueryError, QueryErrorState, buildQueryError} from '@coveo/headless';\nimport {Component, h, State} from '@stencil/core';\nimport {AriaLiveRegion} from '../../../utils/accessibility-utils';\nimport {\n BindStateToController,\n InitializableComponent,\n InitializeBindings,\n} from '../../../utils/initialization-utils';\nimport {QueryErrorCommon} from '../../common/query-error/query-error-common';\nimport {Bindings} from '../atomic-search-interface/atomic-search-interface';\n\n/**\n * The `atomic-query-error` component handles fatal errors when performing a query on the index or Search API. When the error is known, it displays a link to relevant documentation link for debugging purposes. When the error is unknown, it displays a small text area with the JSON content of the error.\n *\n * @part icon - The svg related to the error.\n * @part title - The title of the error.\n * @part description - A description of the error.\n * @part doc-link - A link to the relevant documentation.\n * @part more-info-btn - A button to request additional error information.\n * @part error-info - Additional error information.\n */\n@Component({\n tag: 'atomic-query-error',\n styleUrl: 'atomic-query-error.pcss',\n shadow: true,\n})\nexport class AtomicQueryError implements InitializableComponent {\n @InitializeBindings() public bindings!: Bindings;\n public queryError!: QueryError;\n\n @BindStateToController('queryError')\n @State()\n private queryErrorState!: QueryErrorState;\n @State() public error!: Error;\n @State() showMoreInfo = false;\n\n @AriaLiveRegion('query-error')\n protected ariaMessage!: string;\n\n public initialize() {\n this.queryError = buildQueryError(this.bindings.engine);\n }\n\n public render() {\n return (\n (this.showMoreInfo = true)}\n queryErrorState={this.queryErrorState}\n setAriaLive={(msg) => (this.ariaMessage = msg)}\n showMoreInfo={this.showMoreInfo}\n />\n );\n }\n}\n"]}