<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import Input from '../common/input';

export default function Form(props) {
  const {
    onChange,
    save,
    closeModal,
    iss,
    clientId,
    jwksUrl,
    tokenUrl,
    oidcUrl,
  } = props;

  return (
    <form>
      <div className="o-grid o-grid__modal-top">
        <div className="o-grid__item u-half">
          <Input
            className="c-input"
            labelText="iss"
            inputProps={{
              id: 'iss_input',
              name: 'iss',
              type: 'text',
              value: iss,
              onChange
            }}
          />
        </div>
        <div className="o-grid__item u-half">
          <Input
            className="c-input"
            labelText="client id"
            inputProps={{
              id: 'client_id_input',
              name: 'clientId',
              type: 'text',
              value: clientId,
              onChange
            }}
          />
        </div>
        <div className="o-grid__item u-half">
          <Input
            className="c-input"
            labelText="jwks url"
            inputProps={{
              id: 'jwks_url_input',
              name: 'jwksUrl',
              type: 'text',
              value: jwksUrl,
              onChange
            }}
          />
        </div>
        <div className="o-grid__item u-half">
          <Input
            className="c-input"
            labelText="token url"
            inputProps={{
              id: 'token_url_input',
              name: 'tokenUrl',
              type: 'text',
              value: tokenUrl,
              onChange
            }}
          />
        </div>
        <div className="o-grid__item u-half">
          <Input
            className="c-input"
            labelText="oidc url"
            inputProps={{
              id: 'oidc_url_input',
              name: 'oidcUrl',
              type: 'text',
              value: oidcUrl,
              onChange
            }}
          />
        </div>
      </div>
      <button
        type="button"
        onClick={() => save()}
        className="c-btn c-btn--yellow"
      >
        Save
      </button>

      <button
        type="button"
        className="c-btn c-btn--gray--large u-m-right"
        onClick={() => closeModal()}
      >
        Cancel
      </button><commit_msg>added default values to inputs to fix uncontrolled input issue<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import Input from '../common/input';

export default function Form(props) {
  const {
    onChange,
    save,
    closeModal,
    iss,
    clientId,
    jwksUrl,
    tokenUrl,
    oidcUrl,
  } = props;

  return (
    <form>
      <div className="o-grid o-grid__modal-top">
        <div className="o-grid__item u-half">
          <Input
            className="c-input"
            labelText="iss"
            inputProps={{
              id: 'iss_input',
              name: 'iss',
              type: 'text',
              value: iss || '',
              onChange
            }}
          />
        </div>
        <div className="o-grid__item u-half">
          <Input
            className="c-input"
            labelText="client id"
            inputProps={{
              id: 'client_id_input',
              name: 'clientId',
              type: 'text',
              value: clientId || '',
              onChange
            }}
          />
        </div>
        <div className="o-grid__item u-half">
          <Input
            className="c-input"
            labelText="jwks url"
            inputProps={{
              id: 'jwks_url_input',
              name: 'jwksUrl',
              type: 'text',
              value: jwksUrl || '',
              onChange
            }}
          />
        </div>
        <div className="o-grid__item u-half">
          <Input
            className="c-input"
            labelText="token url"
            inputProps={{
              id: 'token_url_input',
              name: 'tokenUrl',
              type: 'text',
              value: tokenUrl || '',
              onChange
            }}
          />
        </div>
        <div className="o-grid__item u-half">
          <Input
            className="c-input"
            labelText="oidc url"
            inputProps={{
              id: 'oidc_url_input',
              name: 'oidcUrl',
              type: 'text',
              value: oidcUrl || '',
              onChange
            }}
          />
        </div>
      </div>
      <button
        type="button"
        onClick={() => save()}
        className="c-btn c-btn--yellow"
      >
        Save
      </button>

      <button
        type="button"
        className="c-btn c-btn--gray--large u-m-right"
        onClick={() => closeModal()}
      >
        Cancel
      </button>
{'fraction_non_alphanumeric': 0.1240532241555783, 'fraction_numerical': 0.0, 'mean_word_length': 1.1411042944785277, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 51, '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': '6642856', 'n_tokens_mistral': 1338, 'n_tokens_neox': 1361, 'n_words': 284}