/**
@license
Copyright 2018 The Advanced REST Client authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.
*/
import { LitElement, TemplateResult, PropertyValues } from 'lit';
import { PrismHighlighter } from './PrismHighlighter.js';
/** @typedef {import('prismjs')} Prism */
/**
 * Syntax highlighting via Prism
 *
 * ### Example
 *
 * ```html
 * <prism-highlight id="c1" lang="markdown"></prism-highlight>
 * <script>
 *  document.querySelector('#c1').code = '# Test highlight';
 * &lt;/script>
 * ```
 *
 * The `lang` attribute is required and the component will not start parsing data without it.
 *
 * Changing the `lang` and `code` properties together, do it in less than 10 ms.
 * The element is set to commit changes after this time period. Otherwise it may display
 * old and new code due to the asynchronous nature of the code highlighter.
 *
 * @fires link - An event dispatched when the user click on the link. The detail object has the `url` property with the link value and the `asNew` property set to `true` when ctrl/cmd key was pressed when the link was clicked.
 */
export default class PrismHighlight extends LitElement {
    /**
     * A data to be highlighted and rendered.
     * @attribute
     */
    code?: string;
    /**
     * Prism supported language.
     * @attribute
     */
    lang: string;
    /**
     * When set it ignores syntax highlighting and only renders the code.
     * @attribute
     */
    raw?: boolean;
    readonly outputElement?: HTMLElement | null;
    protected highlighter: PrismHighlighter;
    protected tokenizeResults?: string;
    protected updated(cp: PropertyValues | Map<PropertyKey, unknown>): void;
    firstUpdated(): void;
    reset(): void;
    protected handleHighlight(code: string): void;
    protected rawChanged(): void;
    /**
     * Highlights the code.
     */
    protected highlight(): void;
    /**
     * Handler for click events.
     */
    protected handleLinks(e: MouseEvent): void;
    render(): TemplateResult;
    protected renderHighlighted(): TemplateResult;
    protected renderRaw(): TemplateResult;
}
//# sourceMappingURL=PrismHighlight.d.ts.map