import{LitElement as e,html as i,css as t}from"../../lit/index.js";import{SchemaBehaviors as s}from"../schema-behaviors/schema-behaviors.js";import{DDDSuper as l}from"../d-d-d/d-d-d.js";import"../simple-icon/simple-icon.js";import"../simple-icon/lib/simple-icons.js";import"../simple-fields/lib/simple-fields-field.js";import"../simple-toolbar/lib/simple-toolbar-button.js";import"../simple-toast/simple-toast.js";import{QuestionElement as o}from"./lib/QuestionElement.js";class MultipleChoice extends o{static get tag(){return"multiple-choice"}constructor(){super()}renderDirections(){return i`<p>
      <strong>
        ${this.singleOption?i`Select the answer`:i`Select all that apply`}</strong
      >, then press <strong>${this.t.checkAnswer}</strong>. You will get
      feedback indicating correctness of your answer and how to proceed.
    </p>`}static get haxProperties(){return new URL(`./lib/${this.tag}.haxProperties.json`,import.meta.url).href}haxinlineContextMenu(e){e.ceButtons=[{icon:"icons:add",callback:"haxClickInlineAdd",label:"Add answer"},{icon:"icons:remove",callback:"haxClickInlineRemove",label:"Remove answer"},{icon:"lrn:edit",callback:"haxToggleEdit",label:"Toggle editing feedback blocks"}]}haxClickInlineAdd(e){this.resetAnswer();let i=this.answers;return i.push({label:"New answer",correct:!1}),this.answers=[...i],!0}haxClickInlineRemove(e){if(this.answers.length>0){this.resetAnswer();let e=this.answers;return e.pop(),this.answers=[...e],!0}}}globalThis.customElements.define(MultipleChoice.tag,MultipleChoice);export{MultipleChoice};