import React from "react"; import { CSSObject } from "create-emotion"; import { TColor } from "../types"; interface CoreProps { children: React.ReactChild; style: React.CSSProperties; /** Project global state. */ state: { [key: string]: () => { this: { setState: () => void, state: {} } } | string | number | {} } /** Project theme. */ theme: { buttons: (props: { color: TColor, isGhost: boolean, isFluid: boolean }) => CSSObject } } export const STATE: { /** Gets an object property. */ useGet: (path: string) => any, /** Changes an object property. */ set: (path: string, value: any) => void, /** Updates an object property. */ update: (path: string, value: (oldVal: any) => any) => void, /** Push into a deep array ,it will create intermediate objects/arrays if necessary. */ push: (path: string, value: any) => void, /** Deletes a property. Can also delete a deep array item using splice */ del: (path: string, value: any) => void, /** Shallow copy properties. */ assign: (path: string, value: any) => void, /** Insert property at the specific array index. (value should be in form of [value, index]) */ insert: (path: string, value: [any, number]) => void, /** Deep merge properties. */ merge: (path: string, value: any) => void, /** Calls a function property . (value should be in form of [argA, argB, etc...]) */ call: (path: string, value: any) => void, } declare const Core: React.StatelessComponent export default Core