import { Control, type ControlPosition } from 'leaflet'; import { choice, str, type PropDef } from '../core/props.ts'; import { WithProps, type LeafletElementConstructor } from '../core/with-props.ts'; const PROPS: { position: PropDef; prefix: PropDef; } = { position: choice('bottomright'), prefix: str(), }; const Base: LeafletElementConstructor = WithProps(PROPS, { attach: 'self', }); /** `` — the map's attribution control (`Control.Attribution`). */ export default class LeafletControlAttributionElement extends Base { declare readonly leafletObject?: Control.Attribution; createLeafletObject(options: Control.AttributionOptions): Control.Attribution { return new Control.Attribution(options); } }