import { cloneObject, extend } from "../util";
import { getProp } from "../objects/get-prop";
import { removeEmptyProps } from "../objects/remove-empty-props";
/**
 * Default Site Theme
 */
export const DEFAULT_THEME = {
    header: {
        background: "#fff",
        text: "#4c4c4c",
    },
    body: {
        background: "#fff",
        text: "#4c4c4c",
        link: "#0079c1",
    },
    button: {
        background: "#0079c1",
        text: "#fff",
    },
    logo: {
        small: "",
    },
    fonts: {
        base: {
            url: "",
            family: "Avenir Next",
        },
        heading: {
            url: "",
            family: "Avenir Next",
        },
    },
};
/**
 * Return the default theme, extended with values from the Org's shared theme
 * @param {Object} portalSelf Org's Portal object
 */
export function getOrgDefaultTheme(portalSelf) {
    let defaultTheme = cloneObject(DEFAULT_THEME);
    let sharedTheme = getProp(portalSelf, "portalProperties.sharedTheme");
    if (sharedTheme) {
        sharedTheme = removeEmptyProps(sharedTheme);
        defaultTheme = extend(defaultTheme, sharedTheme);
    }
    return defaultTheme;
}
//# sourceMappingURL=themes.js.map