<commit_before>import { OpenStreetMapProvider } from 'leaflet-geosearch';
import * as React from 'react';
import { MapContainer } from 'react-leaflet';

import { SubmitButton } from '@waldur/form';
import { translate } from '@waldur/i18n';
import { CloseDialogButton } from '@waldur/modal/CloseDialogButton';
import { ModalDialog } from '@waldur/modal/ModalDialog';

import './SetLocationDialog.scss';
import { GeoSearchControlElement } from './GeoSearchControlElement';
import { OpenStreeMapTileLayer } from './OpenStreeMapTileLayer';
import { GeolocationPoint } from './types';

interface Data extends GeolocationPoint {
  uuid: string;
  name: string;
}

interface SetLocationDialogProps {
  resolve: { data: Data; setLocationFn: (data: Data) => void };
}

const provider = new OpenStreetMapProvider();

export const SetLocationDialog = (props: SetLocationDialogProps) => {
  const [coordinates, setCoordinates] = React.useState<GeolocationPoint>({
    latitude: props.resolve.data.latitude,
    longitude: props.resolve.data.longitude,
  });

  return (
    <ModalDialog
      title={
        props.resolve.data.latitude && props.resolve.data.latitude
          ? translate('Update location')<commit_msg>Fixed condition for set location dialog title<commit_after>import { OpenStreetMapProvider } from 'leaflet-geosearch';
import * as React from 'react';
import { MapContainer } from 'react-leaflet';

import { SubmitButton } from '@waldur/form';
import { translate } from '@waldur/i18n';
import { CloseDialogButton } from '@waldur/modal/CloseDialogButton';
import { ModalDialog } from '@waldur/modal/ModalDialog';

import './SetLocationDialog.scss';
import { GeoSearchControlElement } from './GeoSearchControlElement';
import { OpenStreeMapTileLayer } from './OpenStreeMapTileLayer';
import { GeolocationPoint } from './types';

interface Data extends GeolocationPoint {
  uuid: string;
  name: string;
}

interface SetLocationDialogProps {
  resolve: { data: Data; setLocationFn: (data: Data) => void };
}

const provider = new OpenStreetMapProvider();

export const SetLocationDialog = (props: SetLocationDialogProps) => {
  const [coordinates, setCoordinates] = React.useState<GeolocationPoint>({
    latitude: props.resolve.data.latitude,
    longitude: props.resolve.data.longitude,
  });

  return (
    <ModalDialog
      title={
        props.resolve.data.latitude && props.resolve.data.longitude
          ? translate('Update location')
{'fraction_non_alphanumeric': 0.11923233973050225, 'fraction_numerical': 0.0016333197223356473, 'mean_word_length': 4.932203389830509, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1980919', 'n_tokens_mistral': 713, 'n_tokens_neox': 698, 'n_words': 173}