import*as Host from"../../../core/host/host.js";import*as i18n from"../../../core/i18n/i18n.js";import*as Platform from"../../../core/platform/platform.js";import*as ComponentHelpers from"../../components/helpers/helpers.js";import*as LitHtml from"../../lit-html/lit-html.js";import*as Buttons from"../buttons/buttons.js";const UIStrings={feedback:"Feedback"},str_=i18n.i18n.registerUIStrings("ui/components/panel_feedback/FeedbackButton.ts",UIStrings),i18nString=i18n.i18n.getLocalizedString.bind(void 0,str_),feedbackIconUrl=new URL("../../../Images/review.svg",import.meta.url).toString();export class FeedbackButton extends HTMLElement{static litTagName=LitHtml.literal`devtools-feedback-button`;#t=this.attachShadow({mode:"open"});#e=this.#o.bind(this);#n={feedbackUrl:Platform.DevToolsPath.EmptyUrlString};set data(t){this.#n=t,ComponentHelpers.ScheduledRender.scheduleRender(this,this.#e)}#s(){Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(this.#n.feedbackUrl)}#o(){if(!ComponentHelpers.ScheduledRender.isScheduledRender(this))throw new Error("FeedbackButton render was not scheduled");LitHtml.render(LitHtml.html`
      <${Buttons.Button.Button.litTagName}
          @click=${this.#s}
          .iconUrl=${feedbackIconUrl}
          .variant=${"secondary"}
      >${i18nString(UIStrings.feedback)}</${Buttons.Button.Button.litTagName}>
      `,this.#t,{host:this})}}ComponentHelpers.CustomElements.defineComponent("devtools-feedback-button",FeedbackButton);