/**
 * What this installation is called, who the company is, and how it looks.
 *
 * The system is sold to solar companies, so the company's own details — its
 * legal name, ABN, address and contact numbers — along with the words on the
 * landing and sign-in screens, the accent colour and the two images are
 * settings rather than constants. Every field falls back to the application's
 * own default until a client changes it.
 */
export type Branding = {
    name: string;
    tagline: string;
    headline: string;
    subheadline: string;
    support_email: string | null;
    support_phone: string | null;
    website: string | null;
    /** The registered entity, when it differs from the trading name. */
    legal_name: string | null;
    /** Stored as eleven digits, printed as "ABN 12 345 678 901". */
    abn: string | null;
    abn_label: string | null;
    acn: string | null;
    acn_label: string | null;
    address_line1: string | null;
    address_line2: string | null;
    suburb: string | null;
    state: string | null;
    postcode: string | null;
    country: string | null;
    /** The address already composed into the lines a page prints. */
    address_lines: string[];
    /** The accent colour as a six-digit hex, or null for the built-in theme. */
    primary_color: string | null;
    logo_url: string | null;
    login_background_url: string | null;
    /**
     * The staff sign-in screen's own words. Headline and tagline are already
     * resolved against the brand's, so a panel that was never given its own
     * reads in the company's voice.
     */
    login_eyebrow: string;
    login_headline: string;
    login_tagline: string;
    login_card_title: string;
    login_card_description: string;
    login_footer_note: string;
    /** The three sentences the panel lists, in order. */
    login_features: Array<{ title: string; body: string }>;
    /** The colour the panel falls back to when there is no photograph. */
    login_background_color: string;
    /**
     * The sign-in panel's paint, worked out server-side so the chosen colour
     * reaches the screen without a second copy of the maths in the browser.
     */
    login_panel: {
        color: string;
        glow: string;
        veil: string;
    };
    /** Whether this client has changed anything at all. */
    customised: boolean;
};

export type BrandingBackgroundImage = {
    /** The file on the private disk. */
    path: string;
    /** The route that serves it, available even when it is not in use. */
    url: string;
    uploaded_at: string;
    /** Already formatted for the gallery label. */
    uploaded_label: string;
    in_use: boolean;
};

export type BrandingSettingsProps = {
    branding: Branding & { background_images: BrandingBackgroundImage[] };
    /** The words shown as placeholders, and what a reset puts back. */
    defaults: {
        name: string;
        tagline: string;
        headline: string;
        subheadline: string;
        primary_color: string;
        login_background_color: string;
        login_eyebrow: string;
        login_headline: string;
        login_tagline: string;
        login_card_title: string;
        login_card_description: string;
        login_footer_note: string;
        login_features: Array<{ title: string; body: string }>;
        support_email: string;
        support_phone: string;
        website: string;
        legal_name: string;
        abn: string;
        acn: string;
        address_line1: string;
        address_line2: string;
        suburb: string;
        state: string;
        postcode: string;
        country: string;
    };
    /** The Australian states and territories, for the address select. */
    states: Array<{ value: string; label: string }>;
    can: { manage: boolean };
};
