import { useMutation, useQueryClient, } from '@tanstack/react-query';
import { NullSeamClientError, useSeamClient } from '../../../../lib/seam/use-seam-client.js';
export function useCreateClimateSettingSchedule() {
    const { client } = useSeamClient();
    const queryClient = useQueryClient();
    return useMutation({
        mutationFn: async (mutationParams) => {
            if (client === null)
                throw new NullSeamClientError();
            return await client.thermostats.climateSettingSchedules.create(mutationParams);
        },
        onSuccess: () => {
            void queryClient.invalidateQueries([
                'thermostats',
                'climate_setting_schedules',
                'list',
            ]);
        },
    });
}
//# sourceMappingURL=use-create-climate-setting-schedule.js.map