<commit_before>import * as React from 'react';
import { Button, ButtonType } from 'office-ui-fabric-react';
import Header from './Header';
import HeroList, { HeroListItem } from './HeroList';
import Progress from './Progress';

export interface AppProps {
    title: string;
    isOfficeInitialized: boolean;
}

export interface AppState {
    listItems: HeroListItem[];
}

export default class App extends React.Component<AppProps, AppState> {
    constructor(props, context) {
        super(props, context);
        this.state = {
            listItems: []
        };
    }

    componentDidMount() {
        this.setState({
            listItems: [
                {
                    icon: 'Ribbon',
                    primaryText: 'Achieve more with Office integration'
                },
                {
                    icon: 'Unlock',
                    primaryText: 'Unlock features and functionality'
                },
                {
                    icon: 'Design',
                    primaryText: 'Create and visualize like a pro'
                }
            ]
        });
    }

    click = async () => {
<% if (host === 'Outlook') { %><%# Outlook doesn't expose Outlook.run() %>
        /**
         * Insert your <%= host %> code here
         */
<% } else { %>
        await <%= host %>.run(async (context) => {
            /**
             * Insert your <%= host %> code here
             */
            await context.sync();
        });
<% } %>
    }

    render() {
        const {
            title,
            isOfficeInitialized,<commit_msg>Added PowerPoint case to App component button handler<commit_after>import * as React from 'react';
import { Button, ButtonType } from 'office-ui-fabric-react';
import Header from './Header';
import HeroList, { HeroListItem } from './HeroList';
import Progress from './Progress';

export interface AppProps {
    title: string;
    isOfficeInitialized: boolean;
}

export interface AppState {
    listItems: HeroListItem[];
}

export default class App extends React.Component<AppProps, AppState> {
    constructor(props, context) {
        super(props, context);
        this.state = {
            listItems: []
        };
    }

    componentDidMount() {
        this.setState({
            listItems: [
                {
                    icon: 'Ribbon',
                    primaryText: 'Achieve more with Office integration'
                },
                {
                    icon: 'Unlock',
                    primaryText: 'Unlock features and functionality'
                },
                {
                    icon: 'Design',
                    primaryText: 'Create and visualize like a pro'
                }
            ]
        });
    }

    click = async () => {
<% if (host === 'Outlook') { %><%# Outlook doesn't expose Outlook.run() %>
        /**
         * Insert your <%= host %> code here
         */
<% } else if (host === 'PowerPoint') { %><%# PowerPoint doesn't use RichAPI %>
        /**
         * Insert your <%= host %> code here
         */
        Office.context.document.setSelectedDataAsync('Hello World!', {
            coercionType: Office.CoercionType.Text
        }, result => {
            if (result.status === Office.AsyncResultStatus.Failed) {
                console.error(result.error.message);
            }
        });
<% } else { %>
        await <%= host %>.run(async (context) => {
            /**
             * Insert your <%= host %> code here
             */
            await context.sync();
        });
<% } %>
    }

    render() {
        const {
            title,
            isOfficeInitialized,
{'fraction_non_alphanumeric': 0.12558267068823692, 'fraction_numerical': 0.0, 'mean_word_length': 1.5089408528198074, 'pattern_counts': {'":': 0, '<': 22, '<?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': '365289', 'n_tokens_mistral': 979, 'n_tokens_neox': 909, 'n_words': 238}