import { isConst, isObject } from '../../utils/types'

type SignUpResponse = {
    Success: true,
} | {
    Success: false,
    Message: string,
}

const isSignUpResponse = (obj: unknown): obj is SignUpResponse => (
    isObject(obj, {
        'Success': isConst(true),
    }) || isObject(obj, {
        'Success': isConst(false),
        'Message': 'string',
    })
)

type SignUp = boolean

export type { SignUpResponse, SignUp }

export { isSignUpResponse }
