import { css, html } from 'lit'
import { property } from 'lit/decorators.js'
import { when } from 'lit/directives/when.js'
import { UsBaseElement } from '../base/UsBaseElement'
import { customElementIfNotExist } from '../../utils/customElementIfNotExist'
import { localizeManager, localized } from '../../dependencies'
import { dispatchCustomEvent } from '../../utils/dispatchCustomEvent'
import type { IFeedbackReason } from './model/IFeedbackReason'
import type { IFeedbackReasonSendEvent } from './model/IFeedbackReasonSendEvent'
import style_css from './styles.pcss'
import '../popup/UsPopup'
import '../loader/UsLoader'
import '../footer/UsFooter'
import '../form/input/UsInput'
declare global {
interface HTMLElementTagNameMap {
'us-feedback-popup': USFeedbackPopup
}
}
@customElementIfNotExist('us-feedback-popup')
@localized()
export class USFeedbackPopup extends UsBaseElement {
static styles = [
UsBaseElement.styles,
css([style_css] as TemplateStringsArray | any),
]
@property({ type: Array }) reasons: IFeedbackReason[] = []
@property({ type: String }) reasonText = ''
@property({ type: String }) description = ''
@property({ type: String }) reasonLabel = ''
@property({ type: Boolean }) loading = false
@property({ type: Boolean }) overlay = false
@property({ type: Boolean }) transparent = false
@property({ type: Boolean }) show = false
@property({ type: Boolean }) showReasonText = false
@property({ type: String }) headerTitle = ''
maxReasonTextLength = 800
render() {
return html`
${this.description}