<commit_before>import React, { Component } from 'react';
import { View, Text, StyleSheet } from 'react-native';
import PopupDialog, { DialogButton, SlideAnimation, DefaultAnimation } from 'react-native-popup-dialog';
import Button from './Button';

const slideAnimation = new SlideAnimation({ slideFrom: 'bottom' });
const defaultAnimation = new DefaultAnimation({ animationDuration: 150 });

export default class PopupDialogExample extends Component {
  constructor(props) {
    super(props);

    this.state = {
      dialogOpen: false,
    };

    this.openScaleAnimationDialog = this.openScaleAnimationDialog.bind(this);
    this.openSlideAnimationDialog = this.openSlideAnimationDialog.bind(this);
    this.openDefaultAnimationDialog = this.openDefaultAnimationDialog.bind(this);
  }

  openScaleAnimationDialog() {
    this.scaleAnimationDialog.openDialog();
  }

  openSlideAnimationDialog() {
    this.slideAnimationDialog.openDialog();
  }

  openDefaultAnimationDialog() {
    this.defaultAnimationDialog.openDialog();
  }

  render() {
    return (
      <View style={styles.container}>
        <Button
          text="Open Dialog - Default Animation"
          onPress={this.openDefaultAnimationDialog}
        />

        <Button
          text="Open Dialog - Scale Animation"
          onPress={this.openScaleAnimationDialog}
        />

        <Button
          text="Open Dialog - Slide Animation"
          onPress={this.openSlideAnimationDialog}
        />

        <PopupDialog
          ref={(defaultAnimationDialog) => {
            this.defaultAnimationDialog = defaultAnimationDialog;
          }}
          dialogAnimation={defaultAnimation}
          title="Popup Dialog - Default Animation"
        >
          <View style={styles.dialogContentView}>
            <Text>Default Animation</Text>
          </View>
        </PopupDialog>

        <PopupDialog
          ref={(popupDialog) => {
            this.scaleAnimationDialog = popupDialog;
          }}
          title="Popup Dialog - Scale Animation"
          actions={[<commit_msg>update example app<commit_after>import React, { Component } from 'react';
import { View, Text, StyleSheet } from 'react-native';
import PopupDialog, {
  DialogButton,
  SlideAnimation,
  ScaleAnimation,
  DefaultAnimation,
} from 'react-native-popup-dialog';
import Button from './Button';

const slideAnimation = new SlideAnimation({ slideFrom: 'bottom' });
const scaleAnimation = new ScaleAnimation();
const defaultAnimation = new DefaultAnimation({ animationDuration: 150 });

export default class PopupDialogExample extends Component {
  constructor(props) {
    super(props);

    this.state = {
      dialogOpen: false,
    };

    this.openScaleAnimationDialog = this.openScaleAnimationDialog.bind(this);
    this.openSlideAnimationDialog = this.openSlideAnimationDialog.bind(this);
    this.openDefaultAnimationDialog = this.openDefaultAnimationDialog.bind(this);
  }

  openScaleAnimationDialog() {
    this.scaleAnimationDialog.openDialog();
  }

  openSlideAnimationDialog() {
    this.slideAnimationDialog.openDialog();
  }

  openDefaultAnimationDialog() {
    this.defaultAnimationDialog.openDialog();
  }

  render() {
    return (
      <View style={styles.container}>
        <Button
          text="Open Dialog - Default Animation"
          onPress={this.openDefaultAnimationDialog}
        />

        <Button
          text="Open Dialog - Scale Animation"
          onPress={this.openScaleAnimationDialog}
        />

        <Button
          text="Open Dialog - Slide Animation"
          onPress={this.openSlideAnimationDialog}
        />

        <PopupDialog
          ref={(defaultAnimationDialog) => {
            this.defaultAnimationDialog = defaultAnimationDialog;
          }}
          dialogAnimation={defaultAnimation}
          title="Popup Dialog - Default Animation"
        >
          <View style={styles.dialogContentView}>
            <Text>Default Animation</Text>
          </View>
        </PopupDialog>

        <PopupDialog
          ref={(popupDialog) => {
            this.scaleAnimationDialog = popupDialog;
          }}
          dialogAnimation={scaleAnimation}
          title="Popup Dialog - Scale Animation"
          actions={[
{'fraction_non_alphanumeric': 0.10240112994350282, 'fraction_numerical': 0.0014124293785310734, 'mean_word_length': 2.807347670250896, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 27, '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': '4726574', 'n_tokens_mistral': 1100, 'n_tokens_neox': 1064, 'n_words': 213}