/**
 * Copyright (c) 2020-present, Goldman Sachs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { type ObserverContext, type PureModel, type V1_CDate, type V1_CStrictTime, type V1_CString, PRIMITIVE_TYPE, PrimitiveInstanceValue, SimpleFunctionExpression, V1_AppliedFunction } from '@finos/legend-graph';
import { type ApplicationStore, type LegendApplicationConfig, type LegendApplicationPlugin, type LegendApplicationPluginManager } from '@finos/legend-application';
export type CustomDatePickerValueSpecification = SimpleFunctionExpression | PrimitiveInstanceValue | V1_AppliedFunction | V1_CDate | V1_CStrictTime | V1_CString;
export type CustomDatePickerUpdateValueSpecification<T> = (_valueSpecification: T | undefined, value: string | CustomDateOption | CustomFirstDayOfOption | CustomPreviousDayOfWeekOption | DatePickerOption, options?: {
    primitiveTypeEnum?: PRIMITIVE_TYPE;
}) => void;
export declare enum CUSTOM_DATE_PICKER_OPTION {
    ABSOLUTE_DATE = "Absolute Date",
    ABSOLUTE_TIME = "Absolute Time",
    TODAY = "Today",
    NOW = "Now",
    YESTERDAY = "Yesterday",
    ONE_YEAR_AGO = "One Year Ago",
    ONE_MONTH_AGO = "One Month Ago",
    ONE_WEEK_AGO = "One Week Ago",
    CUSTOM_DATE = "Custom Date",
    PREVIOUS_DAY_OF_WEEK = "Previous ... of Week",
    FIRST_DAY_OF = "First day of...",
    LATEST_DATE = "Latest Date"
}
export declare enum CUSTOM_DATE_OPTION_UNIT {
    DAYS = "Day(s)",
    WEEKS = "Week(s)",
    MONTHS = "Month(s)",
    YEARS = "Year(s)"
}
export declare enum CUSTOM_DATE_FIRST_DAY_OF_UNIT {
    WEEK = "Week",
    MONTH = "Month",
    QUARTER = "Quarter",
    YEAR = "Year"
}
export declare enum CUSTOM_DATE_DAY_OF_WEEK {
    MONDAY = "Monday",
    TUESDAY = "Tuesday",
    WENDNESDAY = "Wednesday",
    THURSDAY = "Thursday",
    FRIDAY = "Friday",
    SATURDAY = "Saturday",
    SUNDAY = "Sunday"
}
export declare enum CUSTOM_DATE_OPTION_DIRECTION {
    BEFORE = "Before",
    AFTER = "After"
}
export declare enum CUSTOM_DATE_OPTION_REFERENCE_MOMENT {
    TODAY = "Today",
    NOW = "Now",
    FIRST_DAY_OF_THIS_YEAR = "Start of Year",
    FIRST_DAY_OF_QUARTER = "Start of Quarter",
    FIRST_DAY_OF_MONTH = "Start of Month",
    FIRST_DAY_OF_WEEK = "Start of Week",
    PERVIOUS_DAY_OF_WEEK = "Previous Day of Week"
}
/**
 * DatePickerOption is the base class being used to display and generate the corresponding pure date function.
 */
export declare class DatePickerOption {
    /**
     * label is the text that shows up in the valueSpecification box.
     */
    label: string;
    /**
     * value is the selected date option in date-dropdown.
     */
    value: string;
    constructor(label: string, value: string);
}
export declare class CustomDateOption extends DatePickerOption {
    /**
     * duration is the amount of time span that will be adjusted.
     */
    duration: number;
    /**
     * unit represents the time duration unit, e.g. year, week, etc.
     */
    unit: CUSTOM_DATE_OPTION_UNIT | undefined;
    /**
     * direction means the direction in which time adjustment will go to.
     */
    direction: CUSTOM_DATE_OPTION_DIRECTION | undefined;
    /**
     * referenceMoment is the date which adjustment starts from.
     */
    referenceMoment: CUSTOM_DATE_OPTION_REFERENCE_MOMENT | undefined;
    constructor(label: string, value: string, duration: number, unit: CUSTOM_DATE_OPTION_UNIT | undefined, direction: CUSTOM_DATE_OPTION_DIRECTION | undefined, referenceMoment: CUSTOM_DATE_OPTION_REFERENCE_MOMENT | undefined);
    generateDisplayLabel(): string;
    updateLabel(): void;
}
export declare class CustomFirstDayOfOption extends DatePickerOption {
    /**
     * unit: time unit, e.g. Week, Month, etc.
     */
    unit: CUSTOM_DATE_FIRST_DAY_OF_UNIT | undefined;
    constructor(label: string, unit: CUSTOM_DATE_FIRST_DAY_OF_UNIT | undefined);
}
export declare class CustomPreviousDayOfWeekOption extends DatePickerOption {
    /**
     * day: which day in the week will be selected.
     */
    day: CUSTOM_DATE_DAY_OF_WEEK;
    constructor(label: string, day: CUSTOM_DATE_DAY_OF_WEEK);
}
export declare const reservedCustomDateOptions: CustomDateOption[];
/**
 * Generate pure date functions based on the DatePickerOption.
 */
export declare const buildPureDateFunctionExpression: (datePickerOption: DatePickerOption, graph: PureModel, observerContext: ObserverContext) => SimpleFunctionExpression;
/**
 * Generate pure date functions based on the DatePickerOption (for V1 protocol).
 */
export declare const buildV1PureDateFunctionExpression: (datePickerOption: DatePickerOption) => V1_AppliedFunction;
/**
 * Generate the pure date adjust() function based on the CustomDateOption.
 */
export declare const buildPureAdjustDateFunction: (customDateOption: CustomDateOption, graph: PureModel, observerContext: ObserverContext) => SimpleFunctionExpression;
/**
 * Generate the pure date adjust() function based on the CustomDateOption (for V1 protocol).
 */
export declare const buildV1PureAdjustDateFunction: (customDateOption: CustomDateOption) => V1_AppliedFunction;
/**
 * Build CustomDateOption based on the pure date adjust() function.
 * Transform CustomDateOption if it matches any preserved custom adjust date functions. e.g. One Month Ago..
 */
export declare const buildCustomDateOption: (valueSpecification: CustomDatePickerValueSpecification | undefined, applicationStore: ApplicationStore<LegendApplicationConfig, LegendApplicationPluginManager<LegendApplicationPlugin>>) => CustomDateOption;
/**
 * Build DatePickerOption from pure date functions or PrimitiveInstanceValue
 */
export declare const buildDatePickerOption: (valueSpecification: CustomDatePickerValueSpecification | undefined, applicationStore: ApplicationStore<LegendApplicationConfig, LegendApplicationPluginManager<LegendApplicationPlugin>>) => DatePickerOption;
//# sourceMappingURL=CustomDatePickerHelper.d.ts.map