import { Reference } from './reference';
export interface Block extends Reference {
    readonly name?: string;
    readonly elements: Block.Element[];
    readonly settings: {
        readonly linked: string[];
    };
}
export declare namespace Block {
    const empty: () => Block;
    enum Type {
        Audio = "audio",
        Checkbox = "checkbox",
        Download = "download",
        Header = "header",
        Image = "image",
        ImageMap = "image-map",
        Input = "input",
        Link = "link",
        Matrix = "matrix",
        Radio = "radio",
        Slider = "slider",
        Sort = "sort",
        Table = "table",
        Text = "text",
        Video = "video"
    }
    const ICON_MAP: {
        [E in Type]: string;
    };
    type Element = ElementAudio | ElementCheckbox | ElementDownload | ElementHeader | ElementImage | ElementImageMap | ElementInput | ElementLink | ElementMatrix | ElementRadio | ElementSlider | ElementSort | ElementTable | ElementText | ElementVideo;
    type Value<T extends Element> = Omit<Omit<T, 'id'>, 'type'>;
    type Template<T extends Element, L> = Value<T> & Omit<L, 'name'> & {
        value?: Value<T>;
    };
    interface ElementLabels {
        readonly [Type.Audio]?: ElementAudio.Labels;
        readonly [Type.Checkbox]?: ElementCheckbox.Labels;
        readonly [Type.Download]?: ElementDownload.Labels;
        readonly [Type.Header]?: ElementHeader.Labels;
        readonly [Type.Image]?: ElementImage.Labels;
        readonly [Type.ImageMap]?: ElementImageMap.Labels;
        readonly [Type.Input]?: ElementInput.Labels;
        readonly [Type.Link]?: ElementLink.Labels;
        readonly [Type.Matrix]?: ElementMatrix.Labels;
        readonly [Type.Radio]?: ElementRadio.Labels;
        readonly [Type.Slider]?: ElementSlider.Labels;
        readonly [Type.Sort]?: ElementSort.Labels;
        readonly [Type.Table]?: ElementTable.Labels;
        readonly [Type.Text]?: ElementText.Labels;
        readonly [Type.Video]?: ElementVideo.Labels;
    }
    type ElementOption = SelectElementOption | SortElementOption | TableElementColumn;
    interface ElementAudio extends BaseElement {
        readonly type: Type.Audio;
        readonly location: string;
        readonly autoplay: boolean;
    }
    namespace ElementAudio {
        type Template = Block.Value<ElementAudio>;
        type Component = Block.Template<ElementAudio, Labels>;
        interface Labels extends LabelsUploadInput {
            readonly name?: string;
            readonly labelAutoplay?: string;
            readonly placeholderLocation?: string;
        }
    }
    interface ElementCheckbox extends BaseElement, QuestionElement, SelectElement {
        readonly type: Type.Checkbox;
        readonly answer: number[];
    }
    namespace ElementCheckbox {
        type Template = Block.Value<ElementCheckbox>;
        type Component = Block.Template<ElementCheckbox, Labels>;
        interface Labels extends LabelsQuestion, LabelsOptionCreator {
            readonly name?: string;
            readonly labelOrientation?: string;
            readonly labelOrientationH?: string;
            readonly labelOrientationV?: string;
            readonly placeholderOptions?: string;
        }
    }
    interface ElementDownload extends BaseElement {
        readonly type: Type.Download;
        readonly text: string;
        readonly location: string;
    }
    namespace ElementDownload {
        type Template = Block.Value<ElementDownload>;
        type Component = Block.Template<ElementDownload, Labels>;
        interface Labels extends LabelsUploadInput {
            readonly name?: string;
            readonly placeholderText?: string;
            readonly placeholderLocation?: string;
        }
    }
    interface ElementHeader extends BaseElement {
        readonly type: Type.Header;
        readonly text: string;
    }
    namespace ElementHeader {
        type Template = Block.Value<ElementHeader>;
        type Component = Block.Template<ElementHeader, Labels>;
        interface Labels {
            readonly name?: string;
            readonly placeholderText?: string;
        }
    }
    interface ElementImage extends BaseElement {
        readonly type: Type.Image;
        readonly location: string;
    }
    namespace ElementImage {
        type Template = Block.Value<ElementImage>;
        type Component = Block.Template<ElementImage, Labels>;
        interface Labels extends LabelsUploadInput {
            readonly name?: string;
            readonly placeholderLocation?: string;
        }
    }
    interface ElementImageMap extends BaseElement {
        readonly type: Type.ImageMap;
        readonly location: string;
    }
    namespace ElementImageMap {
        type Template = Block.Value<ElementImageMap>;
        type Component = Block.Template<ElementImageMap, Labels>;
        interface Labels {
            readonly name?: string;
        }
    }
    interface ElementInput extends BaseElement, QuestionElement {
        readonly type: Type.Input;
        readonly multiline: boolean;
        readonly min: number | null;
        readonly max: number | null;
        readonly hasAnswer: boolean;
        readonly answer: string;
    }
    namespace ElementInput {
        type Template = Block.Value<ElementInput>;
        type Component = Block.Template<ElementInput, Labels>;
        interface Labels extends LabelsQuestion {
            readonly name?: string;
            readonly labelMultiline?: string;
            readonly labelMin?: string;
            readonly labelMax?: string;
            readonly labelHasAnswer?: string;
            readonly labelAnswer?: string;
            readonly placeholderAnswer?: string;
        }
    }
    interface ElementLink extends BaseElement {
        readonly type: Type.Link;
        readonly href: string;
        readonly text: string;
        readonly icon: string;
    }
    namespace ElementLink {
        type Template = Block.Value<ElementLink>;
        type Component = Block.Template<ElementLink, Labels>;
        interface Labels {
            readonly name?: string;
            readonly labelHref?: string;
            readonly labelText?: string;
            readonly labelIcon?: string;
            readonly placeholderHref?: string;
            readonly placeholderText?: string;
            readonly placeholderIcon?: string;
        }
    }
    interface ElementMatrix extends BaseElement, QuestionElement {
        readonly type: Type.Matrix;
        readonly rows: SelectElementOption[];
        readonly columns: SelectElementOption[];
    }
    namespace ElementMatrix {
        type Template = Block.Value<ElementMatrix>;
        type Component = Block.Template<ElementMatrix, Labels>;
        interface Labels extends LabelsQuestion, LabelsOptionCreator {
            readonly name?: string;
            readonly labelRows?: string;
            readonly labelColumns?: string;
            readonly placeholderRows?: string;
            readonly placeholderColumns?: string;
        }
    }
    interface ElementRadio extends BaseElement, QuestionElement, SelectElement {
        readonly type: Type.Radio;
        readonly answer: number | null;
    }
    namespace ElementRadio {
        type Template = Block.Value<ElementRadio>;
        type Component = Block.Template<ElementRadio, Labels>;
        interface Labels extends LabelsQuestion, LabelsOptionCreator {
            readonly name?: string;
            readonly labelOrientation?: string;
            readonly labelOrientationH?: string;
            readonly labelOrientationV?: string;
            readonly placeholderOptions?: string;
        }
    }
    interface ElementSlider extends BaseElement, QuestionElement {
        readonly type: Type.Slider;
        readonly step: number;
        readonly min: number;
        readonly max: number;
        readonly minText: string;
        readonly maxText: string;
    }
    namespace ElementSlider {
        type Template = Block.Value<ElementSlider>;
        type Component = Block.Template<ElementSlider, Labels>;
        interface Labels extends LabelsQuestion {
            readonly name?: string;
            readonly labelStep?: string;
            readonly labelMin?: string;
            readonly labelMax?: string;
            readonly labelMinText?: string;
            readonly labelMaxText?: string;
        }
    }
    interface ElementSort extends BaseElement, QuestionElement {
        readonly type: Type.Sort;
        readonly dual: boolean;
        readonly options: SortElementOption[];
        readonly feedbackCorrect: string;
        readonly feedbackIncorrect: string;
    }
    namespace ElementSort {
        type Template = Block.Value<ElementSort>;
        type Component = Block.Template<ElementSort, Labels>;
        interface Labels extends LabelsQuestion, LabelsOptionCreator {
            readonly name?: string;
            readonly labelDual?: string;
            readonly labelFeedbackCorrect?: string;
            readonly labelFeedbackIncorrect?: string;
            readonly placeholderOptions?: string;
            readonly placeholderFeedbackCorrect?: string;
            readonly placeholderFeedbackIncorrect?: string;
        }
    }
    interface ElementTable extends BaseElement, QuestionElement {
        readonly type: Type.Table;
        readonly columns: TableElementColumn[];
        readonly orientation: 'horizontal' | 'vertical';
        readonly maxRows: number;
    }
    namespace ElementTable {
        type Template = Block.Value<ElementTable>;
        type Component = Block.Template<ElementTable, Labels>;
        interface Labels extends LabelsQuestion, LabelsOptionCreator {
            readonly name?: string;
            readonly labelOrientation?: string;
            readonly labelOrientationH?: string;
            readonly labelOrientationV?: string;
            readonly labelMaxRows?: string;
            readonly placeholderColumns?: string;
        }
    }
    interface ElementText extends BaseElement {
        readonly type: Type.Text;
        readonly text: string;
    }
    namespace ElementText {
        type Template = Block.Value<ElementText>;
        type Component = Block.Template<ElementText, Labels>;
        interface Labels {
            readonly name?: string;
            readonly placeholderText?: string;
        }
    }
    interface ElementVideo extends BaseElement {
        readonly type: Type.Video;
        readonly location: string;
        readonly autoplay: boolean;
    }
    namespace ElementVideo {
        type Template = Block.Value<ElementVideo>;
        type Component = Block.Template<ElementVideo, Labels>;
        interface Labels extends LabelsUploadInput {
            readonly name?: string;
            readonly labelAutoplay?: string;
            readonly placeholderLocation?: string;
        }
    }
    interface LabelsQuestion {
        readonly labelQuestion?: string;
        readonly labelRequired?: string;
    }
    interface LabelsUploadInput {
        readonly labelUploadButton?: string;
        readonly labelDeleteButton?: string;
    }
    interface LabelsOptionCreator {
        readonly labelOCAddButton?: string;
        readonly labelOCRemoveButton?: string;
        readonly labelOCOther?: string;
        readonly labelOCImage?: string;
    }
    interface BaseElement {
        readonly id: string;
        readonly type: Type;
    }
    interface QuestionElement {
        readonly question: string;
        readonly required: boolean;
    }
    interface SelectElementOption {
        readonly text: string;
        readonly image?: string;
        readonly feedback?: string;
    }
    interface SortElementOption {
        readonly text: string;
        readonly answer?: string;
        readonly image?: string;
        readonly feedback?: string;
    }
    interface SelectElement {
        readonly orientation: 'horizontal' | 'vertical';
        readonly options: SelectElementOption[];
        readonly other: boolean;
    }
    interface TableElementColumn {
        readonly text: string;
        readonly image?: string;
        readonly feedback?: string;
    }
}
