import React, {useEffect, useRef} from 'react';
import CharLimit from './decorators/CharLimit'
import styled from 'styled-components'
import FloatingLabel from './decorators/FloatingLabel'
import Dropdown from 'react-dropdown';
import { LANGS, THEMES } from './renderers/Code';
import * as indentation from 'indent-textarea';
const RelPositioning = styled.div`
position: relative;
height: calc(100% - 4em);
`
const FlexChild = styled.div`
display: block;
margin-left: 2em;
`
const TitleInput = (props) => {
return (
);
}
const PasteInput = ({content, ...props}) => {
const textInput = useRef(null);
useEffect(() => {
indentation.watch(textInput.current);
}, [textInput])
return (
);
}
const PassInput = (props) => {
return (
);
}
const GenericDropdown = (props) => {
function _onSelect(option) {
props.onChange({
target: {
name: props.label,
value: option.label
}
});
}
return (
);
}
const ExpiryInput = (props) => {
const options = [
'5 years',
'1 year',
'1 month',
'1 week',
'1 day',
'1 hour',
'10 min',
];
return (
);
}
const LangInput = (props) => {
const options = Object.entries(LANGS).map((key, _) => {
return {
'value': key[1],
'label': key[0]
}
})
return (
);
}
const ThemeInput = (props) => {
const options = Object.entries(THEMES).map((key, _) => {
return {
'value': key[1],
'label': key[0]
}
})
return (
);
}
const PasteURLInput = ({id, fullURL}) => {
return (
);
}
export { TitleInput, PasteInput, PassInput, ExpiryInput, PasteURLInput, LangInput, ThemeInput }