const { text, textarea, image, icon, select, combobox, object, stringList, objectList, } = require("./sharedFields"); const statusOptions = [ { value: "Active", label: "Active" }, { value: "Inactive", label: "Inactive" }, ]; module.exports = { key: "accreditation", title: "Accreditation Management", subtitle: "Manage the content for the accreditation page", routeBase: "/admin/accreditation", apiPath: "/api/accreditation", previewPath: "/about/accreditation", dataFile: "accreditation", imageType: "accreditation", tabs: [ { key: "hero", label: "Hero", icon: "fas fa-image", schema: object("hero", "Hero", [ text("badge", "Eyebrow label", { maxLength: 30 }), text("title", "Headline", { maxLength: 60 }), textarea("description", "Supporting text", { maxLength: 420, rows: 5 }), ]), }, { key: "grid", label: "Accreditation Grid", icon: "fas fa-table-cells-large", schema: object("grid", "Accreditation grid", [ stringList("tabs", "Category tabs", { itemLabel: "Tab", maxLength: 30, sortable: true, helpText: "Add and reorder the category tabs shown on the page.", }), objectList( "items", "Accreditation cards", [ icon("icon", "Fallback icon"), image("image", "Card image", { imageHint: "Recommended 118x58 px minimum visible ratio", helpText: "Logo or badge shown at the top of the card.", }), select("status", "Status", statusOptions), combobox("category", "Category", { maxLength: 30, optionsPath: "grid.tabs", }), text("title", "Card title", { maxLength: 17, helpText: "Keep this very short. Around 17 characters fits best in the card title area.", }), textarea("description", "Card description", { maxLength: 300, rows: 5, helpText: "Keep this concise. Around 300 characters fits best in the card description area.", }), ], { itemLabel: "Accreditation", sortable: true, itemTitleKey: "title", itemSubtitleKey: "category", emptyText: "No accreditation cards yet.", }, ), ]), }, ], };