// Copyright (C) The Arvados Authors. All rights reserved.
//
// SPDX-License-Identifier: AGPL-3.0
import * as React from 'react';
import { Grid, StyleRulesCallback, Divider, Switch, Typography } from '@material-ui/core';
import { Field, WrappedFieldProps, formValues, formValueSelector } from 'redux-form';
import { PermissionSelect, formatPermissionLevel, parsePermissionLevel } from './permission-select';
import { WithStyles } from '@material-ui/core/styles';
import withStyles from '@material-ui/core/styles/withStyles';
import { connect } from 'react-redux';
const sharingPublicAccessStyles: StyleRulesCallback<'root'> = theme => ({
root: {
padding: `${theme.spacing.unit}px 0`,
}
});
const SharingPublicAccessForm = withStyles(sharingPublicAccessStyles)(
({ classes }: WithStyles<'root'>) =>
<>
Public access
>
);
export default () => ;
const PublicAccessSwitch = (props: WrappedFieldProps) =>
;
const publicAccessSwitchStyles: StyleRulesCallback<'root'> = theme => ({
root: {
margin: `0 -7px`,
}
});
const PublicAccessSwitchComponent = withStyles(publicAccessSwitchStyles)(
({ input, classes }: WrappedFieldProps & WithStyles<'root'>) =>
);
const PermissionSelectComponent = connect(
(state: any, props: WrappedFieldProps) => ({
disabled: !formValueSelector(props.meta.form)(state, 'enabled'),
})
)(({ input, disabled }: WrappedFieldProps & { disabled: boolean }) => {
return ;
});