import { IEmbed } from './interfaces' import { get } from 'lodash' const root = (state: any): IEmbed => state.embed const configuration = (state: any) => root(state).configuration export const organizationUrl = (state: any) => get(configuration(state), 'organizationUrl', null) export const theme = (state: any) => get(configuration(state), 'theme', {}) export const backgroundColor = (state: any) => get(theme(state), 'backgroundColor', '0176FF') export const foregroundColor = (state: any) => get(theme(state), 'foregroundColor', 'FFFFFF')