({
take: [
{
type: "dropdown",
label: "Alphabet",
options: [
{ label: "English / Latin", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZ" },
{ label: "Greek", value: "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ" },
{ label: "Cyrillic", value: "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ" },
{ label: "Hebrew", value: "אבגדהוזחטיכךלמנסעפצקרשתםןףץ" },
{ label: "Swedish", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖ" },
{ label: "Danish / Norwegian", value: "ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ" },
],
},
{ type: "button", action: "make", label: "Randomise" },
],
make: ([lang]) => {
const result = {
type: "card",
title: lang.split("")[Math.floor(Math.random() * lang.length)],
}
return new Promise((resolve) =>
window.setTimeout(() => resolve(result), 300)
)
},
})