hunk.code_window:   private async lock(resource: string, ttl: number): Promise<() => Promise<void>> {
       if (!this.distributedLock) {
         Logger.log(`Redlock was not started. Starting after calling lock ${resource} for ${ttl} ms`, LOG_CONTEXT);
         this.startup();
       }
       try {
  
hunk.labels: keep keep keep replace keep keep keep keep
hunk.after_edit:       shouldLog &&
           Logger.log(`Redlock was not started. Starting after calling lock ${resource} for ${ttl} ms`, LOG_CONTEXT);
  
hunk.file_path: apps/api/src/app/shared/services/distributed-lock/distributed-lock.service.ts
hunk.type: replace
file: import { createStyles, MantineTheme } from '@mantine/core';
  import { colors } from '../config';
  
  export default createStyles<string, { disabled: boolean }>((theme, _params, getRef) => {
    const dark = theme.colorScheme === 'dark';
    const label = getRef('label');
  
    return {
      icon: {
        color: 'white',
      },
      input: {
        backgroundColor: 'transparent',
        border: `1px solid ${theme.colors.gray[7]}`,
        '&:checked': {
          backgroundImage: colors.horizontal,
          color: dark ? 'white' : colors.B40,
          border: 'transparent',
          [`& + .${label}`]: {
            fontWeight: 'bold !important',
          },
          '&:disabled': {
            opacity: '0.45',
            '& + svg': {
              color: 'white',
              opacity: '0.45',
            },
          },
        },
        '&:disabled': {
          backgroundColor: 'transparent',
        },
      },
      label: {
        ref: label,
        color: dark ? 'white' : colors.B40,
        fontSize: '14px',
        padding: '0',
        margin: '0 10px',
        opacity: _params.disabled ? 0.4 : 1,
      },
    } as any;
  });
  