import { inputButtonProps } from "@/digital-components/base-input-button/button-functionality-props";

export default {
    model: {
        prop: "modelValue",
        event: "change",
    },
    props: {
        ...inputButtonProps,
        buttonLabel: [Number, String],
        buttonLabelSubCopy: String,
        buttonBodyCopy: String,
        buttonAuxillaryCopy: String,
        buttonFooterCopy: String,
        buttonImage: String,
        buttonImageId: String,
        altText: {
            type: String,
            default: "",
        },
        textPosition: String,
        screenReaderOnlyText: String,
        isWide: Boolean,
        additionalButtonData: Object,
    },
    computed: {
        selectedValue: {
            get() {
                return this.modelValue;
            },
            set(e) {
                if (this.preHandleAnswerChange) {
                    this.preHandleAnswerChange(e);
                }

                this.$emit("update:modelValue", e);
            },
        },
    },
};
